You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 new variables: 2 levels: tx cx; 3 level cx, dose A, dose B (among the active ones)
lung_cancer.csv
analyses: two analyses
Update this section to be 1) 2 trt geting out odds ratio using confint.default and confint as described above. Then repeat using 2) 3 trt model & how to do contrasts of 2 trts vs a third treatment as per this code below.
Contrast statements for 2 or more treatments
To create contrasts, you can use the fit.contrast() function from the gmodels package.
This can be used with lm and glm objections:
Suppose we had a 3 level treatment variable (trt01p), whose levels were ordered Dose1, Dose2, Placebo.
You would fit the model as above, followed by fit.contrast(). This is effective testing the null hypothesis that 0.5dose1 + 0.5 dose2 - placebo = 0.
m2 <- glm(wt_grp ~ sex + trt01p, data = lung2, family = binomial(link=“logit”))
fit.contrast(m2,‘trt01p’,c(0.5,0.5,-1),conf.int=0.95)
The text was updated successfully, but these errors were encountered: