Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logistic regression: improve existing documentation #371

Open
3 tasks
andreaczhang opened this issue Jan 8, 2025 · 1 comment
Open
3 tasks

Logistic regression: improve existing documentation #371

andreaczhang opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@andreaczhang
Copy link
Collaborator

  • understand whether the data example is appropriate
  • move R part in the comparison page in the appropriate place
  • if needed, re-run the examples
@andreaczhang andreaczhang added the enhancement New feature or request label Jan 8, 2025
@andreaczhang
Copy link
Collaborator Author

  • 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants