Hi, We are analizing the relationship between the abundance of groupers in line transects and some variables. We are using the quasipoisson distribution. Do we need to include the length of the transects as an offset if they all have the same length?? Also, can we include in the gam models variables that are measured at different spatial scales? We have done an analysis to see what variables are better for different sizes of buffers around the transect lines and some variables are better at different scales. Can we run the gam model with several explanatory variables if they are measured at different spatial scales? Thanks, Lucia -- View this message in context: http://r.789695.n4.nabble.com/offset-in-gam-and-spatial-scale-of-variables-tp2222483p2222483.html Sent from the R help mailing list archive at Nabble.com.
Could you specify the package you use? If it is mgcv, this one centers your variables before applying the smooths. That's something to take into account when comparing different models. In any way, If scales are too different, I try rescaling by either : expressing things in different units (meter versus kilometer, gr) On Wed, May 19, 2010 at 10:37 AM, Lucia Rueda <lucia.rueda@ba.ieo.es> wrote:> > Hi, > > We are analizing the relationship between the abundance of groupers in line > transects and some variables. We are using the quasipoisson distribution. > Do > we need to include the length of the transects as an offset if they all > have > the same length?? > > Also, can we include in the gam models variables that are measured at > different spatial scales? We have done an analysis to see what variables > are > better for different sizes of buffers around the transect lines and some > variables are better at different scales. Can we run the gam model with > several explanatory variables if they are measured at different spatial > scales? > > Thanks, > > Lucia > -- > View this message in context: > http://r.789695.n4.nabble.com/offset-in-gam-and-spatial-scale-of-variables-tp2222483p2222483.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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 Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 Joris.Meys@Ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
Could you specify the package you use? If it is mgcv, this one centers your variables before applying the smooths. That's something to take into account when comparing different models. In any way, If scales are too different, I try rescaling by either : - expressing things in different units (meter versus kilometer, gram versus kilogram) - dividing by the standard deviation to get all variables appx on the same order of magnitude. This does change the interpretation of your model though. But somehow I have the feeling you're not talking about that kind of difference in scales. Could you please explain a bit more in detail what it is exactly you're trying to do? I also suspect some autocorrelation problem, which would direct you towards a gamm method. Cheers Joris On Wed, May 19, 2010 at 10:37 AM, Lucia Rueda <lucia.rueda@ba.ieo.es> wrote:> > Hi, > > We are analizing the relationship between the abundance of groupers in line > transects and some variables. We are using the quasipoisson distribution. > Do > we need to include the length of the transects as an offset if they all > have > the same length?? > > Also, can we include in the gam models variables that are measured at > different spatial scales? We have done an analysis to see what variables > are > better for different sizes of buffers around the transect lines and some > variables are better at different scales. Can we run the gam model with > several explanatory variables if they are measured at different spatial > scales? > > Thanks, > > Lucia > -- > View this message in context: > http://r.789695.n4.nabble.com/offset-in-gam-and-spatial-scale-of-variables-tp2222483p2222483.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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 Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 Joris.Meys@Ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
> We are analizing the relationship between the abundance of groupers in line > transects and some variables. We are using the quasipoisson distribution. > Do we need to include the length of the transects as an offset if they all > have the same length??--- not just for fitting, I suppose: although I guess you may need some care in interpreting the units of the fitted model predictions, if you leave it out.> Also, can we include in the gam models variables that are measured at > different spatial scales? We have done an analysis to see what variables > are better for different sizes of buffers around the transect lines and > some variables are better at different scales. Can we run the gam model > with several explanatory variables if they are measured at different > spatial scales?--- Do you mean, for example, that that sea surface temperature was measured every in 10km grid squares by satellite, whereas salinity was measured every quarter nautical mile directly? --- If so, I think that you can use such data, but you need a clear method for converting what is measured about the covariate to a covariate value associated with each response measurement. As an example you might have salinity measures that are widely scattered, and do not coincide with the locations of response measurements. One option is to smooth or interpolate the salinity values, and use the resulting predicted salinities at each response datum location as covariates. Of course if you do this sort of thing it's important that only such predicted salinities are used for predicting from the model (i.e. not to switch to direct measurements of salinity for prediction) best, Simon> > Thanks, > > Lucia--> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283