[R] mgcv

Joris Meys jorismeys at gmail.com
Mon Jun 7 23:06:58 CEST 2010


predict(sm1,type="terms",terms="s(x2)")

see ?predict.gam

Cheers
Joris

On Mon, Jun 7, 2010 at 7:25 PM, Dipa Hari <haridipa at yahoo.com> wrote:
>
>
> Hello Sir,
> I am using mgcv package for my data.
> My model is y~x1+f(x2),I want to find out the function f(x2) .
> Following is the code.
>
> sm1=gam(y~x1+s(x2),family=binomial, f)
> summary(sm1)
> plot(sm1,residuals=TRUE, xlab="AGE",pch=20)
>
> In this plot I am getting S(x2,1.93) on y axixs
> How should I get the function for x2 from this plot.or Is there anyother procedure in R  to get this function or value for that particular function.for example f(x2)= log(x2) so from that plot how can I get this kind of formula for x2 variable?
> How can I find variance covariance matrix  for that model and confidence interval for that model ? I tried delta method but I am not getting result.
> Hope you understand my question?
> Thanks
>
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



More information about the R-help mailing list