BS835 Class 6 HW exercises

BS835 Class 6 HW exercises

Questions 1 and 2 are from the in-class exercises

(Hypothetical data based broadly on Maslow et.al., Reproductive Outcomes Following Maternal Exposure to the Events of September 11, 2001, at the World Trade Center, in New York City, AJPH.) To determine the effect of exposure to the events of 9/11 (including both environmental exposures and stress-related exposures), exposure data was collected on n=3,360 women who gave birth to a singleton child in NYC between Oct. 2001 and December 2010. We will look at any exposure (categorized as exposed vs. not exposed; the study looked at different types of exposures as well), and focus on low birthweight as the adverse outcome potentially related to exposure. We expect the effect of exposure to be stronger for babies born in the two years following 9/11, and so we are interested in potential effect modification.

Hypothetical data are saved in the file ‘WTC Births.xlsx’. Variables in the data set are:

1) idnum, a study ID number

2) momage, mother’s age at 9/11, categorized and coded as 1 for those under 30 years, 2 for those aged 30 to 35 years, and 3 for those older than 35

3) college, maternal education coded 1 for those with a 4 year college degree, 0 for those with less than a college degree

4) earlyperiod, coded 1 for births that occurred within 2 years of 9/11, and 0 for those that occurred more than 2 years after 9/11

5) exposure, maternal exposure to the events from 9/11

6) LBW, low birthweight, coded 1 for infants weighing less than 2,000 grams, 0 for those weighing 2,000 grams or more.

Question 1. Our broad research question is whether a woman’s exposure to the events of 9/11 had an adverse effect on the outcome of her pregnancy.

As a preliminary check on the data, 5.2% of the mom’s in the study had a low birthweight infant.

As a first analysis, fit a multiple logistic regression model with low birthweight as the outcome variable and exposure, time period (the earlyperiod variable), maternal age, and maternal education as predictors. I’ve summarized results in the following table (you can check to see that your results match the results in the table):

Variable aOR 95% CI
Exposed to events of 9/11

Birth within 2 yrs of 9/11

Maternal age

<30 yrs

30 – 35 yrs

>35 yrs

College degree

1.35

1.15

Ref

0.90

0.82

0.43

0.99, 1.84

0.82, 1.61

—

0.62, 1.29

0.53, 1.27

0.31, 0.58

Run a Hosmer-Lemeshow test to check on the fit of the model, and interpret the results of this Hosmer-Lemeshow test.

Discuss these findings for the exposure variable – was there an effect of exposure on low birthweight? Explain.

Question 2. The study sample included births from the 10 years following 9/11. The investigators believe that the effect of exposure would be strong for women pregnant at the time of 9/11 or shortly after, but that the effect of exposure may weaken over time. To investigate, run a model including the covariates from Question 1, but adding an interaction term between exposure and the ‘earlyperiod’ (birth within 2 years of 9/11) variable.

Results from the interaction model are given in the table below (Note this table asks for slopes, not odds ratios). Check these results using the SAS or R code given below:

Results of a logistic regression interaction model predicting low birthweight

Variable Slope p-value

for slope

Intercept

Exposed to events of 9/11

Birth within 2 yrs of 9/11

Exposure x Birth within 2 yrs

Maternal age

<30 yrs

30 – 35 yrs

>35 yrs

College degree

-2.360

0.083

-0.227

0.747

Ref

-0.108

-0.196

-0.845

<0.001

0.663

0.376

0.035

—

0.561

0.377

<0.001

The table below focuses on the effect of exposure, during the early period and during the late period for the study (effect modification of the effect of exposure by time), from the above interaction model. See the SAS and R code below. While results age given by R and SAS , I think you can calculate the two odds ratios by hand (with a calculator) from the slopes above – check these calculations. I think we need to use the computer to get the confidence intervals for these odds ratios.

Effect of exposure to the events of 9/11 on low birthweight, by time period of delivery

Time Period aOR 95% CI for aOR
Birth within 2 years of 9/11 2.29 1.28, 4.12
Birth more than 2 years after 9/11 1.09 0.75, 1.58

Is there effect modification here? Explain (address significance as well as size of the effect).

Some SAS and R help follow:

SAS code for the interaction model in Question 2

proc logistic;

class momage (ref=’1′) / param=ref;

model lowBW (event=’1′) = exposure earlyperiod exposure*earlyperiod

momage college;

estimate ‘Exposure OR early period’ exposure 1 exposure*earlyperiod 1

/ exp cl;

estimate ‘Exposure OR late period’ exposure 1 exposure*earlyperiod 0

/ exp cl;

run;

R code for the interaction model in Question 2

# for later period (earlyperiod = 0)

log.out <- glm(lowBW ~ exposure + earlyperiod +

exposure:earlyperiod +

relevel(factor(momage),ref=’1′) +

college,family=binomial(link=’logit’) )

summary(log.out)

exp(coef(log.out))

exp(confint(log.out))

# For contrasts of exposure and interaction terms load ‘multcomp’ package

# R gives slopes and standard error for the early and late effects

# need to convert to ORs and CIs ‘by hand’

library(multcomp)

exp.early <- matrix(c(0,1,0,0,0,0,1),1)

summary(glht(log.out, linfct=exp.early))

exp.late <- matrix(c(0,1,0,0,0,0,0),1)

summary(glht(log.out, linfct=exp.late))

Question 3. We can also test for effect modification through classical epidemiologic stratification methods, although these methods don’t allow for controlling for other variables. I used the Mantel-Haenszel stratification methods (see Class 4 homework, using ‘proc freq’ in SAS and ‘epi.2by2’ in R) to examine the association between exposure to the events of 9/11 and low-birthweight, controlling for (stratifying by) the earlyperiod variable. Results are given below:

Results: From SAS, the Breslow-Day test gives chi-square (1 df) of 4.83, p=0.028.

The stratified results for the effect of exposure on low birthweight were

Early Period: OR = 2.32 (1.30, 4.16)

Late Period: OR = 1.08 (0.74, 1.56).

From R, the Woolf’s test (labeled ‘M-H test of homogeneity of ORs) gives chi-square (1 df) 4.67, p=0.030.

The stratified results were:

Early Period: OR = 2.31 (1.30, 4.22)

Late Period: OR = 1.08 (0.74, 1.56)

Is there significant evidence of effect modification? Explain.

SAS code:

proc freq; table earlyperiod*exposure*lowBW / all; run;

R code:

# M-H analysis

epi.2by2(tab.out,method=’cohort.count’)

# stratified results

oddsratio(table(exposure[earlyperiod==0],lowBW[earlyperiod==0]))

oddsratio(table(exposure[earlyperiod==1],lowBW[earlyperiod==1]))

Question 4. (I’ve done the computer work and summarized results in the table below. SAS code and R code that I used is given at the end of the question.) Significant effect modification indicates that the association of interest is different for different subgroups in the study. So, when there is significant interaction, another way to account for the interaction is to run separate analyses for the different subgroups. One nice consequence of this approach is that it avoids presenting results from interaction models (which can be more complicated to present).

Run two logistic regressions (I’ve done this, see table), one for mothers who gave birth within 2 years of 9/11 (earlyperiod=1), the other for mothers who gave birth after 2 years from 9/11. Both regressions should predict low birthweight from exposure, mom’s age, and mom’s college education. (Note that ‘earlyperiod’ and the interaction term are not included in these models, since the analysis is being done stratified by earlyperiod.) Some SAS and R help is given below.

Results are summarized in the following table:

Results of separate logistic regressions predicting low-birthweight, for women giving birth within 2 years of 9/11 and for women giving birth more than 2 years after 9/11

Birth within 2 years of 9/11

(n=840)

Birth more than 2 years after 9/11

(n=2520)

Variable aOR 95% CI aOR 95% CI
Exposed to events of 9/11

Maternal age

<30 yrs

30 – 35 yrs

>35 yrs

College degree

2.30

Ref

0.72

0.82

0.44

1.29, 4.19

—

0.37, 1.42

0.36, 1.77

0.25, 0.79

1.09

Ref

0.98

0.83

0.42

0.74, 1.57

—

0.64, 1.54

0.49, 1.40

0.29, 0.61

Based on these analyses, describe the effect of exposure, for mothers giving birth either within 2 years or after 2 years from 9/11.

SAS code and R code are below.

Some SAS help:

There are several ways to run a sub-group analysis in SAS. I’ll use the ‘where’ statement, which can be used with most procs, to restrict the analysis to a subgroup.

title ‘Analysis for births within 2 years of 9/11’;

proc logistic; where earlyperiod=1;

class momage (ref=’1′) / param=ref;

model lowBW (event=’1′) = exposure momage college;

run;

title ‘Analysis for births after 2 years of 9/11’;

proc logistic; where earlyperiod=0;

class momage (ref=’1′) / param=ref;

model lowBW (event=’1′) = exposure momage college;

run;

The ‘where’ statement restricts an analysis to the subset of subjects who satisfy the stated condition.

Some R help:

There are several ways to run a sub-group analysis in R. I’ll use what I think of as a ‘select if’ statement, parallel to the ‘where’ statement in SAS. R uses square brackets following a variable name to indicate that only subjects who satisfy the condition in the square brackets should be included in the analysis. One somewhat awkward consequence of this is that the square brackets need to be included with every variable referenced in the procedure.

log.out1 <- glm(lowBW[earlyperiod==1] ~

exposure[earlyperiod==1] +

relevel(factor(momage[earlyperiod==1]),ref=’1′) +

college[earlyperiod==1],

family=binomial(link=’logit’) )

summary(log.out1)

exp(coef(log.out1))

exp(confint(log.out1))

log.out0 <- glm(lowBW[earlyperiod==0] ~

exposure[earlyperiod==0] +

relevel(factor(momage[earlyperiod==0]),ref=’1′) +

college[earlyperiod==0],

family=binomial(link=’logit’) )

summary(log.out0)

exp(coef(log.out0))

exp(confint(log.out0))

Note that two equal signs, ‘==’ are needed to specify an equality in the ‘select if’ statement in the square brackets.
Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .

Admissions

Admission and Business Papers

Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.

Editing

Editing and Proofreading

Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..

Coursework

College Essay Writing

In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.