Post hoc GLM task in R
Budget: €8 – €30 EUR
I need help with glht in R for post hoc of GLM
data.xlsx sample data are about patients with a disease called borreliosis. There are 3 independent variables Doxy as randomised (binary), Age (number) and Sex (binary).
The dependent variable is the failure of treatment (0=successful, 1 =unsuccessful) and it was measured 2 months (Failure2M), 6 months (6M) and 12 months (12M) post-treatment.
The treatment variable is Doxy as randomised (7 day treatment, 14 day treatment)
No. is ID
Task
the researcher is interested in how 3 independent variables are connected with unsuccessful treatment after 12 months - > I've already written the code for GLM for this 3 independent variables as predictors and Failure12M
- Categorize Age into 4 categories based on the quartiles of Age. Make a GLM model by using this categorized variable. -> I also know how to categorize Age in 4 categories and do glm(Failure12M~quartile, family="binomial", data=data), but I need HELP with this following part using "glht" function in R
- By using "glht" function in R get the contrasts between all possible pairs of 4 categories and also between the average of the first two pairs and the last two pairs. For every contrast take into account the correction of the p-value by controlling FWER (Holm)
data.xlsx sample data are about patients with a disease called borreliosis. There are 3 independent variables Doxy as randomised (binary), Age (number) and Sex (binary).
The dependent variable is the failure of treatment (0=successful, 1 =unsuccessful) and it was measured 2 months (Failure2M), 6 months (6M) and 12 months (12M) post-treatment.
The treatment variable is Doxy as randomised (7 day treatment, 14 day treatment)
No. is ID
Task
the researcher is interested in how 3 independent variables are connected with unsuccessful treatment after 12 months - > I've already written the code for GLM for this 3 independent variables as predictors and Failure12M
- Categorize Age into 4 categories based on the quartiles of Age. Make a GLM model by using this categorized variable. -> I also know how to categorize Age in 4 categories and do glm(Failure12M~quartile, family="binomial", data=data), but I need HELP with this following part using "glht" function in R
- By using "glht" function in R get the contrasts between all possible pairs of 4 categories and also between the average of the first two pairs and the last two pairs. For every contrast take into account the correction of the p-value by controlling FWER (Holm)