similar to: Use generalised additive model to plot curve

Displaying 20 results from an estimated 9000 matches similar to: "Use generalised additive model to plot curve"

2001 Jun 11
2
Generalized Additive Model
Hello, I am wondering if someone can direct me to the syntax of the Generalised Additive Model in R? In Splus this is gam(formula, ... inputs would be pretty much the same as glm I suspect..) Any response on that (or what package should I grap) would be appreciated very much. Thanks, Peppy Adi-Purnomo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help
2006 Jun 18
1
GAM selection error msgs (mgcv & gam packages)
Hi all, My question concerns 2 error messages; one in the gam package and one in the mgcv package (see below). I have read help files and Chambers and Hastie book but am failing to understand how I can solve this problem. Could you please tell me what I must adjust so that the command does not generate error message? I am trying to achieve model selection for a GAM which is required for
2001 Dec 22
2
gam plots
Dear R users, Using the library(mgcv) and running R under MacOSX, I have fitted a generalised additive model with binomial errors in order to check the linearity of two continuous variables ap2mm and diffdaysm in a glm: > mymodel.gam <- gam(diedhos~ s(ap2mm) + Dweekm + s(diffdaysm) + Dweekm:diffdaysm + ap2mm:Dweekm, binomial) I would like postscript gam plots for the two smoothed
2012 Sep 06
2
Generalized additive models: Plots for Qualitative Data
Hello, My name is Dontrece Smith. I am creating figures for my GAMs. I change my qualitative variables to 1 or 2 in my dataset, so I would be able to run my GAMs. However, R will only display plots for my quantitative variables and not my qualitative variables. Is there any way to fix this issue? I listed some of my code below: > library(mgcv) This is mgcv 1.7-13. For overview type
2004 Oct 15
1
2d approx
Hi, I am looking for a function that generalizes 'approx' to two (or more) dimensions. The references on the approx help page point toward splines, but a) splines is what I am trying to avoid in the first place and b) splines (except for mgcv splines) seem to be one dimensional. Here is a more detailed account. Using mgcv:gam I fit an additive model xy.gam according to the formula y ~
2010 Jan 24
2
How to define degree=1 in mgcv
Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order to confirm the result from glm1 is consistent to those from gam1 and ns1, I want to define degree=1 in mgcv and ns. I am wondering if there is somebody can give me
2006 Sep 04
2
Fitting generalized additive models with constraints?
Hello, I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) + s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1) have to each always be >0. >From the library documentation and a search of the R-site and R-help archives I have not been able to decipher whether the following is possible using this, or other GAM libraries, or whether I will have to try
2007 Apr 03
3
Testing additive nonparametric model
I have estimated a multiple nonparametric regression using the loess command in R. I have also estimated an additive version of the model using the gam function. Is there a way of using the output of these two models to test the restrictions imposed by the additive model?
2007 Jun 22
1
two basic question regarding model selection in GAM
Qusetion #1 ********* Model selection in GAM can be done by using: 1. step.gam {gam} : A directional stepwise search 2. gam {mgcv} : Smoothness estimation using GCV or UBRE/AIC criterion Suppose my model starts with a additive model (linear part + spline part). Using gam() {mgcv} i got estimated degrees of freedom(edf) for the smoothing splines. Now I want to use the functional form of my model
2011 Dec 07
2
curve fitted ... how to retreive data
Dear R users, I have now managed to fit the curve using the thin plate spline as follows: library(mgcv) b <- gam(y~s(x1,x2,k=100),data =dat) vis.gam(b) What I want now is to get the fitted data for y and copy it so that I use it for further analysis. Many thanks in advance mintewab
2007 Dec 13
1
Two repeated warnings when runing gam(mgcv) to analyze my dataset?
Dear all, I run the GAMs (generalized additive models) in gam(mgcv) using the following codes. m.gam <-gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbinary,family=binomial(logit),data=point) And two repeated warnings appeared. Warnings$B!'(B 1: In gam.fit(G, family = G$family, control = control, gamma = gamma, ... : Algorithm did not converge 2: In gam.fit(G,
2012 Jun 21
2
check.k function in mgcv packages
Hi,everyone, I am studying the generalized additive model and employ the package 'mgcv' developed by professor Wood. However,I can not understand the example listed in check.in function. For example, library(mgcv) set.seed(1) dat <- gamSim(1,n=400,scale=2) ## fit a GAM with quite low `k' b<-gam(y~s(x0,k=6)+s(x1,k=6)+s(x2,k=6)+s(x3,k=6),data=dat) plot(b,pages=1,residuals=TRUE)
2000 Nov 03
3
QUERY: gam models in R?
Hi Allstaters, Does anybody know if the R package can fit Generalised Additive Models?. Thanks indeed, Aurelio. atobias at ole.com ___________________________________________________________________ Consigue tu e-mail gratuito TERRA.ES Haz click en http://www.terra.es/correo/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2013 Jul 08
1
error in "predict.gam" used with "bam"
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 10000. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_alleakti.1.pr=predict(gam.basis_alleakti.1, +
2012 Sep 11
1
How to get curve information from a gam model
I'm using library(mgcv) I did a gam regression like this model <- gam(formula = y ~ s(x), family="binomial") Now I'd like to get 2 vectors x and z (with z=s(x)), so that I can implement the model outside R. How can I do this? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-get-curve-information-from-a-gam-model-tp4642785.html Sent from the
2002 Sep 10
2
Hat values for generalized additive models
Would anyone be able to provide insight for the following question, please? Setting: estimation of prediction intervals for age-period-cohort models using GAMs (rate ~ s(age,period)) Method: bootstrap (Davison and Hinkley, 1997) Issue: standardisation of the residuals for resampling requires an adjustment using the diagonals of the hat matrix. Is there a simple way to get the hat values out of a
2006 Jan 19
2
gam
Dear R users, I'm new to both R and to this list and would like to get advice on how to build generalized additive models in R. Based on the description of gam, which I found on the R website, I specified the following model: model1<-gam(ST~s(MOWST1),family=binomial,data=strikes.S), in which ST is my binary response variable and MOWST1 is a categorical independent variable. I get the
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2009 Mar 24
2
help: what are the basis functions in {mgcv}: gam?
I am writing my thesis with the function gam(), with the package {mgcv}. My command is: gam(y~s(x1,bs="cr")+s(x2, bs="cr")). I need help to know what are the default basis funcitons for gam. I have not found any detailed reference for this. Can anyone help me with this?? -- View this message in context: