[R] GAMs: predictions with the number of live traps as an offset variable

2016-11-25 Thread Nelly Reduan
Hello, I built a Generalized Additive Model (GAM) using a negative binomial distribution (my response variable represents an animal count). In the GAM, I included the log(trapping effort) as an offset variable to account for variations in the sampling effort across trapping sites. Trapping effo

[R] GAMs: test of simple effects following a significant interaction

2016-11-16 Thread Marine Regis
Hello, I am a novice in Generalized Additive Models (GAMs) and I would need some advice on these models. From capture data, I would like to assess the effect of longitudinal changes in proportion of forests on abundance of skunks. To test this, I built this GAM where the dependent variable is th

Re: [R] GAMS, std errors and confidence intervals

2016-07-06 Thread David Winsemius
> On Jul 4, 2016, at 11:44 AM, Dan Jaffe wrote: > > Can anyone help me calculating CIs from a GAM analysis? > > I have calculated a GAM fit (m3) and the associated std errors using > predict.gam > I assume that the 95% CI around each fit value would be 1.96 > times the se.But when I do this

[R] GAMS, std errors and confidence intervals

2016-07-04 Thread Dan Jaffe
Can anyone help me calculating CIs from a GAM analysis? I have calculated a GAM fit (m3) and the associated std errors using predict.gam I assume that the 95% CI around each fit value would be 1.96 times the se.But when I do this both on the original and a test dataset, I find the CI's only en

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-29 Thread Gavin Simpson
On Wed, 2011-09-28 at 02:10 -0700, pigpigmeow wrote: > For example: > GAMs and after stepwise regression: You probably don't want to be doing stepwise model/feature selection in any regression model. Marra & Wood (2011, Computational Statistics and Data Analysis 55; 2372-2387) show results that s

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-29 Thread Simon Wood
See ?predict.gam You create a data frame (e.g. `dat2011') containing the 2011 values for RH, solar, windspeed and transport, then predict(cod,dat2011,type="response") there are various options for type -- see ?predict.gam On 09/28/2011 10:10 AM, pigpigmeow wrote: For example: GAMs and aft

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-28 Thread pigpigmeow
For example: GAMs and after stepwise regression: cod<-gam(newCO~RH+s(solar,bs="cr")+windspeed+s(transport,bs="cr"),family=gaussian (link=log),groupD,methods=REML) I used 10 year meterorology data (2000-2010) to form equation of concentration of carbon monoxide. NOW, I have 2011 meteorology data,

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-27 Thread Daniel Malter
Your questions is pretty opaque. Please adhere to the posting guide. Provide a self-contained (!) example (i.e., code) that reproduces your problem. Generally, you would predict like this: x<-rnorm(100) e<-rnorm(100) y<-x+x^2+e reg<-gam(y~s(x)) plot(reg) predict(reg,newdata=data.frame(x=2)) wher

[R] GAMs in R : How to put the new data into the model?

2011-09-27 Thread pigpigmeow
I have 5 GAMs ( model1, model2, model3, model4 and model5) Before I use some data X(predictor -January to June data) to form a equation and calculate the expected value of Y (predictand -January to June). After variable selection, GAMs (Model 1)were bulit up! R-square :0.40 NOW, I want to use new

Re: [R] GAMs and GAMMS with correlated acoustic data

2008-11-17 Thread Simon Wood
David, Are you using the normalized residuals from the $lme part of the gam object (i.e. something like residuals(foo$lme,type="normalized"))? Without standardization the raw residuals will look pretty much as bad for the gamm as they did for the gam (actually they might even lookl a little wo

[R] GAMs and GAMMS with correlated acoustic data

2008-11-15 Thread David M Warner
Greetings This is a long email. I'm struggling with a data set comprising 2,278 hydroacoustic estimates of fish biomass density made along line transects in two lakes (lakes Michigan and Huron, three years in each lake). The data represent lakewide surveys in each year and each data point rep

[R] GAMs and isotropic bivariate functions with mgcv

2008-11-08 Thread L Dalla
Hi there, I was wondering if by the way the isotropic bivariate function works in the mgcv package, one can use highly correlated coordinates (given the shape of the study area) without worrying about the potential problems of correlation between explanatory variables, i.e., does s(LON, LAT) de

[R] GAMs

2008-03-21 Thread Van Wyk, Jaap
Hi I have been searching for goodness-of-fit tests (or lack of fit tests) for GAMs and cannot find anything. My problem is: after fitting a GAM to mortality data (smoothing crude estimated rates of mortality - a process called graduation in the actuarial literature), (1) how to assess the fit of

[R] GAMs

2008-03-21 Thread Van Wyk, Jaap
Hi I have been searching for goodness-of-fit tests (or lack of fit tests) for GAMs and cannot find anything. My problem is: after fitting a GAM to mortality data (smoothing crude estimated rates of mortality - a process called graduation in the actuarial literature), (1) how to assess the fit of