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

Displaying 20 results from an estimated 200 matches similar to: "GAMs in R : How to put the new data into the model?"

2011 Jun 20
3
About GAM in R, Need YOUR HELP!
I'm beginner in R! I have a lot of problems on R..... I have three questions about GAM 1. What is the function of Gaussian distribution in GAM?(if I choose family is Gaussian) Is it used in the predictand value (Y)? 2. How to plot a graph the gam function? For example: y<-gam(a~s(b),family=gaussian (link=log) ,Data) how to plot x axis is s(b) and y axis is log a??? 3. if I use GAM to
2005 Dec 01
2
What are the possible Probabilstic models in R
HI LIST i am a new R user, i am trying to make a model,which will give me output in probability,which will take predictors and predictand serie as input and and give me output in terms of probability(e.g below normal,normal,above normal etc.).What is the package and what is the function for probability model.What are the possible methods for fitting such type of model,and what is the
2002 Jan 31
2
Help with Bootstrap function.
Dear List I am using R with mcgv package to model spatial variation in density estimates of dorcas gazelle in Sinai. I have 59 points of data and 4 explanatory variables(distance from mountain edge, camel presence, Latitude & Longitude). I want to test the model fir via bootstraping. I have used the jacknife bootstraping but it have the limitation of allowing only 58 trials. I tried to use the
2010 Dec 30
0
prediction intervals for (mcgv) gam objects
As I understand it,  predict.lm(l ,newdata=nd ,interval="confidence") yields confidence bands for the predicted mean of new observations and lm.predict(l ,newdata=nd ,interval="prediction") yields confidence bands for new observations themselves, given an lm object l.   However with regard to {mgcv} although  predict.gam (g ,se.fit=TRUE ,interval= "prediction")
2008 Nov 25
4
glm or transformation of the response?
Dear all, For an introductory course on glm?s I would like to create an example to show the difference between glm and transformation of the response. For this, I tried to create a dataset where the variance increases with the mean (as is the case in many ecological datasets): poissondata=data.frame( response=rpois(40,1:40), explanatory=1:40) attach(poissondata) However, I have run into
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example, say I have 5 objects, model1, model2, model3, model4 and model5. I would like to make a vector of the r.squares from each model by code such as this: rsq <- summary(model1)$r.squared for(i in 2:5){ rsq <- c(rsq, summary(model%i%)$r.squared) } So I assign the first value to rsq then cycle through models 2 through
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a #simple one-way anova. This is an example, I am not stupid enough to want #to simultaneously apply all of these contrasts to real data. With a few #exceptions, the tests that I would compute by hand (or by other software) #will give the same t or F statistics. It is the contrast estimates that R produces #that I can't seem to
2005 Mar 01
3
packages masking other objects
hello all, I am trying to use the function getCovariateFormula(nlme) in conjunction with the library lme4. When I load both packages I get the following message and the getCovariateFormula function no longer works: library(nlme) library(lme4) Attaching package 'lme4': The following object(s) are masked from package:nlme : contr.SAS getCovariateFormula
2006 Jun 23
2
columnwise multiplication?
Hi all, I'd like to do a multiplication between 2 matrices buy only want resulsts of cloumn 1 * column 1, column 2 * column 2 and so on. Now I do C <- diag(t(A) %*% B) Is there a bulit in way to do this? Thank you. [[alternative HTML version deleted]]
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite) awpm (a predatory mite), and orien (sampling location within plant – north or south). I have read
2011 Oct 13
3
Question about GAMs
hi! I hope all of you can help me this question for example GAMs: ozonea<-gam(newozone~ pressure+maxtemp+s(avetemp,bs="cr")+s(ratio,bs="cr"),family=gaussian (link=log),groupA,methods=REML) formula(ozonea) newozone ~ pressure + maxtemp + s(avetemp, bs = "cr") + s(ratio,bs = "cr") #formula of gams coef(ozonea) # extract the coefficient of GAMs
2008 Mar 21
1
GAMs
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 the model with reference to "adherence to data" for the fitted model (I do not think the
2012 Nov 27
1
interactions in GAMs
Hi all, I wonder if it's possible to include a double interaction in a GAM formula. Example: If I do this: mod=gam(energy~s(size, *by=color, by=sex*, k=5) + temperature, ...) I get the interaction betwen size*color and size*sex. But I need size*color*sex, being size a smoother. I've created a new variable (colorsex) which combines all the level of both color (2 levels) and sex (2
2006 Nov 28
4
GAMS and Knots
Hi I was wondering if anyone knew how to work out the number of knots that should be applied to each variable when using gams in the mgcv library? Any help or references would be much appreciated. Thanks Kathryn Baldwin
2008 Jul 24
0
Bootstraping GAMs: confidence intervals
Dear R-Users, I am trying to apply a bootstrap to a GAM in order to calculate the 95% confidence intervals for a smooth curve obtained by the ?plot.gam? function of the mgcv package. Nonetheless, I am getting some difficulties in transposing the results for the graphs. I used the following commands in R, ?mgcv? and ?boot? packages: *> attach(bbvc_11Jul08)* *>
2008 Jul 29
0
Bootstraping GAMs for confidence intervales calculation
Dear R-Users, I am resending this message just to reminder my question regarding the calculation of a bootstrap confidence intervals for a GAM plot. I am trying to apply a bootstrap to a GAM in order to calculate the 95% confidence intervals for a smooth curve obtained by the ?plot.gam? function of the mgcv package. Nonetheless, I am getting some difficulties in transposing the results for
2005 Jul 15
1
nlme and spatially correlated errors
Dear R users, I am using lme and nlme to account for spatially correlated errors as random effects. My basic question is about being able to correct F, p, R2 and parameters of models that do not take into account the nature of such errors using gls, glm or nlm and replace them for new F, p, R2 and parameters using lme and nlme as random effects. I am studying distribution patterns of 50 tree
2012 Jan 16
2
Object not found using GAMs in MGCV Package
This is my first time running GAMs in R. My csv file has these column headings: "X" "Y" "Sound" "Atlantic" "Blacktip" "Bonnet" "Bull" "Finetooth" "Lemon" "Scalloped" "Sandbar" "Spinner" "Abundance" "Diversity"
2011 Jan 26
0
post-hoc comparisons in GAMs (mgcv) with parametric terms
Dear list, I?m wondering if there is something analogous to the TukeyHSD function that could be used for parametric terms in a GAM. I?m using the mgcv package to fit models that have some continuous predictors (modeled as smooth terms) and a single categorical predictor. I would like to do post hoc test on the categorical predictor in the models where it is significant. Any suggestions?
2008 Nov 08
0
GAMs and isotropic bivariate functions with mgcv
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) deal with that by considering their combined effect? Although this sounds more like a statistical