Hello, I'd like to understand 'what' is predicting the response for library(mgcv) gam? For example: library(mgcv) fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial) xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101) plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l") I want to see the generalized function(s) used to predict the response that is plotted above. In other words, f(x) = {[what?]}. I'm new to gam and relatively new to R. I did read ?gam, but I didn't see what I wanted. Thanks, Ben [[alternative HTML version deleted]]
There is an extensive list of references given in ?gam, including an R-news article and Simon Woods's (gam's author) website. Would that not be the logical place to start? -- Bert On Fri, Dec 9, 2011 at 7:05 AM, Ben quant <ccquant at gmail.com> wrote:> Hello, > > I'd like to understand 'what' is predicting the response for library(mgcv) > gam? > > For example: > > library(mgcv) > fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial) > xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101) > plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l") > > I want to see the generalized function(s) used to predict the response that > is plotted above. In other words, f(x) = {[what?]}. I'm new to gam and > relatively new to R. I did read ?gam, but I didn't see what I wanted. > > Thanks, > > Ben > > ? ? ? ?[[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.-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
On Dec 9, 2011, at 10:05 AM, Ben quant wrote:> Hello, > > I'd like to understand 'what' is predicting the response for > library(mgcv) > gam? > > For example: > > library(mgcv) > fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial) > xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101) > plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l") > > I want to see the generalized function(s) used to predict the > response that > is plotted above. In other words, f(x) = {[what?]}. I'm new to gam and > relatively new to R. I did read ?gam, but I didn't see what I wanted.If you are using the help pages to teach yourself about a package you cannot stop at just reading what you might think to be the core function's help page. You need to follow the links that are at the bottom of that page just before the examples. In this case you clearly need to read gamObject and mgcv-package. -- David Winsemius, MD West Hartford, CT
See help("mgcv-FAQ"), item 2. best, Simon On 09/12/11 15:05, Ben quant wrote:> Hello, > > I'd like to understand 'what' is predicting the response for library(mgcv) > gam? > > For example: > > library(mgcv) > fit<- gam(y~s(x),data=as.data.frame(l_yx),family=binomial) > xx<- seq(min(l_yx[,2]),max(l_yx[,2]),len=101) > plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l") > > I want to see the generalized function(s) used to predict the response that > is plotted above. In other words, f(x) = {[what?]}. I'm new to gam and > relatively new to R. I did read ?gam, but I didn't see what I wanted. > > Thanks, > > Ben > > [[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. >-- Simon Wood, Mathematical Science, University of Bath BA2 7AY UK +44 (0)1225 386603 http://people.bath.ac.uk/sw283