Show the first six rows of data and a summary of the data-frame:
Tabulate CHD incidence rates per 1000 person-years for each category of hieng. Calculate (by hand) the ratio of the two incidence rates.
We could also calculate the rates using:
Code for the rate ratios:
Fit a poisson model to find the incidence rate ratio for the high energy group compared to the low energy group and compare the estimate to the one you obtained in the previous question.
Also write out the regression equation, defining your notation.
Grouping the values of total energy into just two groups does not tell us much about how the CHD rate changes with total energy. It is a useful exploratory device, but to look more closely we need to group the total energy into perhaps 3 or 4 groups.
In this example we shall use the cut points 1500, 2500, 3000, 4500. Compare with a normal distribution to check if these cutpoints seem reasonable.
Create a new variable eng3 coded 1500 for values of energy in the range 1500–2499, 2500 for values in the range 2500–2999, and 3000 for values in the range 3000–4500.
Estimate the rates for different levels of eng3. Calculate (by hand) the ratio of rates in the second and third levels to the first level.
Create your own indicator variables for the three levels of eng3.
Check the indicator variables.
Use poisson to compare the second and third levels with the first.
Compare your estimates with those you obtained in part 6e. Write the linear predictor using pen and paper.
Also write out the regression equation, defining your notation.
Use a poisson model to compare the first and third levels with the second. Write the linear predictor using pen and paper.
Repeat the analysis comparing the second and third levels with the first but this time have R create the indicators automatically y using the categorical variable eng3.
Calculate the total number of events during follow-up, person-time at risk, and the crude incidence rate (per 1000 person-years)