Displaying 1 result from an estimated 1 matches for "participant_male".
2010 Aug 30
1
'mgcv' package, problem with predicting binomial (logit) data
...I1],test.pred$fit[I1]-2*M1pred$se[I1],lty=2)
plot(age[I1], test.pred$fit[I1] , type="l")
I a second step, I want to calculate a similar model, but only for
respondents with a certain characteristic. For example, in this case, only
for male respondents.
I use a code that looks like this:
participant_male <- participant[gender=="male"]
age_male <- age[gender=="male"]
test2<-gam(participant_male ~ s(age_male, fx=FALSE, bs="cr"),
family=binomial(logit), na.action=na.omit)
summary(test2)
plot(test2, shade=TRUE)
I get a nice smoother function in this plot, like I...