We use the following packages:
knitr::opts_chunk$set(echo = FALSE, include = FALSE, message = FALSE, eval = FALSE)
The following table shows numbers of occasions when inhibition (i.e., no flow of current across a membrane) occurred within 120 s, for different concentrations of the protein peptide-C. The outcome yes
implies that inhibition has occurred.
conc 0.1 0.5 1 10 20 30 50 70 80 100 150
no 7 1 10 9 2 9 13 1 1 4 3
yes 0 0 3 4 0 6 7 0 0 1 7
R
no
and yes
over the rows (i.e. no
+ yes
)yes
over margin
)margin
as the weightsfit
conc
is somewhat skewed. Run the model again with a log-transformation for conc
.log(conc)
.brandsma
data from package mice
to fit a logistic regression model for sex
based on lpo
(Language Post Outcome).sex
variable and compare your predictions to the observed sex
. minor.head.injury
(from package DAAG
), obtain a logistic regression model relating clinically.important.brain.injury
to all the other variables.End of Practical