Displaying 1 result from an estimated 1 matches for "pas_r".
2010 Aug 30
1
'mgcv' package, problem with predicting binomial (logit) data
...on the gam function.
I predict the chance of being a (frequent) participant at theater plays vs.
not being a participant by age.
Because my outcome variable is dichotomous, I use the binomial family with
logit link function.
Dataset in attachment, code to read it in R:
data <- read.spss("pas_r.sav")
attach(data)
In a first step I use ?gam? to model my data and ?predict? to calculate and
plot the predicted values, this all works fine.
My code looks like this:
test <- gam(participant ~ s(age,fx=FALSE,bs='cr'), family=binomial(logit))
summary(test)
plot(test, shade=TRUE)...