Hi All, When we run the command : summary ( newmod<-gam(Dlq~ formula,family,,data) ) in R, the output would the effect of smoothness in R. As of now to calculate the probability I am following the below approach: 1) Run the plot of the GAM , interpret the curves 2) Re Run the Regression as a GLM after taking into account the non linear terms in step1 3) Calculate the probability from the coefficients obtained in step2, using the appropriate link function But I came across a paper by SAS ( http://support.sas.com/rnd/app/papers/gams.pdf ), Where the parameters outputs are also given when the program is run. So I was wondering if we have something similar in R also? I tried hard but could not find anything. -- View this message in context: http://r.789695.n4.nabble.com/Calculating-the-probability-for-a-logistic-regression-tp4119884p4119884.html Sent from the R help mailing list archive at Nabble.com.
Calculating the probability for a logistic regression
2 messages · sirilkt, Ben Bolker
sirilkt <jankee2010 <at> hotmail.com> writes:
Hi All, When we run the command : summary ( newmod<-gam(Dlq~ formula,family,,data) ) in R, the output would the effect of smoothness in R. As of now to calculate the probability I am following the below approach: 1) Run the plot of the GAM , interpret the curves 2) Re Run the Regression as a GLM after taking into account the non linear terms in step1 3) Calculate the probability from the coefficients obtained in step2, using the appropriate link function But I came across a paper by SAS ( http://support.sas.com/rnd/app/papers/gams.pdf ), Where the parameters outputs are also given when the program is run. So I was wondering if we have something similar in R also? I tried hard but could not find anything.
It's still not entirely clear what you want to do.
What's wrong with
library(gam)
data(kyphosis)
gg <- gam(Kyphosis ~ s(Age,3) +
s(Start,3) + s(Number,3),
data=kyphosis, family=binomial)
predict(gg,type="response")
?
See ?predict.gam for more details.