similar to: can I get standard error from predict.gam()?

Displaying 20 results from an estimated 10000 matches similar to: "can I get standard error from predict.gam()?"

2006 Nov 14
2
gam() question
Hi everyone, I am fitting a bivariate smoothing model by using gam. But I got an error message like this: "Error in eigen(hess1, symmetric = TRUE) : 0 x 0 matrix" If anyone know how to figure it out, pleaselet me know. Thanks very much. [[alternative HTML version deleted]]
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:
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
2013 Jan 17
2
Explore patterns with GAM
Dear all, I new to r and I would like your help. I want to explore the patterns (unimodal, monotonically increased/decreased) of species richness~altitude using GAM in R. Although I run the gam function in mgcv package I do not know how to manually define knots and degrees of freedom. Any help would be greatly appreciated. Spyros -- View this message in context:
2008 Jun 11
1
mgcv::gam error message for predict.gam
Sometimes, for specific models, I get this error from predict.gam in library mgcv: Error in complete.cases(object) : negative length vectors are not allowed Here's an example: model.calibrate <- gam(meansalesw ~ s(tscore,bs="cs",k=4), data=toplot, weights=weight, gam.method="perf.magic") > test <- predict(model.calibrate,newdata) Error in
2012 Feb 17
1
Standard errors from predict.gam versus predict.lm
I've got a small problem. I have some observational data (environmental samples: abiotic explanatory variable and biological response) to which I've fitted both a multiple linear regression model and also a gam (mgcv) using smooths for each term. The gam clearly fits far better than the lm model based on AIC (difference in AIC ~ 8), in addition the adjusted R squared for the gam is
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, +
2011 Mar 28
2
mgcv gam predict problem
Hello I'm using function gam from package mgcv to fit splines. ?When I try to make a prediction slightly beyond the original 'x' range, I get this error: > A = runif(50,1,149) > B = sqrt(A) + rnorm(50) > range(A) [1] 3.289136 145.342961 > > > fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE) > predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE) Error
2007 Oct 05
2
question about predict.gam
I'm fitting a Poisson gam model, say model<-gam(a65tm~as.factor(day.week )+as.factor(week)+offset(log(pop65))+s(time,k=10,bs="cr",fx=FALSE,by=NA,m=1),sp=c( 0.001),data=dati1,family=poisson) Currently I've difficulties in obtaining right predictions by using gam.predict function with MGCV package in R version 2.2.1 (see below my syntax).
2011 Apr 19
1
Prediction interval with GAM?
Hello, Is it possible to estimate prediction interval using GAM? I looked through ?gam, ?predict.gam etc and the mgcv.pdf Simon Wood. I found it can calculate confidence interval but not clear if I can get it to calculate prediction interval. I read "Inference for GAMs is difficult and somewhat contentious." in Kuhnert and Venable An Introduction to R, and wondering why and if that
2009 Jun 18
3
predict.glm and predict.gam output
Hi all, I am currently trying to compare different plant occurrence prediction maps generated in R and exported into GRASS. One of these maps was generated from a glm fitted to some data, and subsequently applying this glm model to a wider region using predict.glm. The outcome here was a probability of occurrence. The second map I generated using a gam (mgcv), however, this map seems to have
2005 Mar 24
1
Prediction using GAM
Recently I was using GAM and couldn't help noticing the following incoherence in prediction: > data(gam.data) > data(gam.newdata) > gam.object <- gam(y ~ s(x,6) + z, data=gam.data) > predict(gam.object)[1] 1 0.8017407 > predict(gam.object,data.frame(x=gam.data$x[1],z=gam.data$z[1])) 1 0.1668452 I would expect that using two types of predict arguments
2004 Dec 22
2
GAM: Getting standard errors from the parametric terms in a GAM model
I am new to R. I'm using the function GAM and wanted to get standard errors and p-values for the parametric terms (I fitted a semi-parametric models). Using the function anova() on the object from GAM, I only get p-values for the nonparametric terms. Does anyone know if and how to get standard errors for the parametric terms? Thanks. Jean G. Orelien
2012 Oct 10
2
GAM without intercept
Hi everybody, I am trying to fit a GAM model without intercept using library mgcv. However, the result has nothing to do with the observed data. In fact the predicted points are far from the predicted points obtained from the model with intercept. For example: #First I generate some simulated data: library(mgcv) x<-seq(0,10,length=100) y<-x^2+rnorm(100) #then I fit a gam model with
2007 Aug 08
1
prediction using gam
I am fitting a two dimensional smoother in gam, say junk = gam(y~s(x1,x2)), to a response variable y that is always positive and pretty well behaved, both x1 and x2 are contained within [0,1]. I then create a new dataset for prediction with values of (x1,x2) within the range of the original data. predict(junk,newdata,type="response") My predicted values are a bit strange
2003 Jun 03
3
gam questions
Dear all, I'm a fairly new R user having two questions regarding gam: 1. The prediction example on p. 38 in the mgcv manual. In order to get predictions based on the original data set, by leaving out the 'newdata' argument ("newd" in the example), I get an error message "Warning message: the condition has length > 1 and only the first element will be used in: if
2011 Jun 24
2
mgcv:gamm: predict to reflect random s() effects?
Dear useRs, I am using the gamm function in the mgcv package to model a smooth relationship between a covariate and my dependent variable, while allowing for quantification of the subjectwise variability in the smooths. What I would like to do is to make subjectwise predictions for plotting purposes which account for the random smooth components of the fit. An example. (sessionInfo() is at
2008 Apr 09
1
mgcv::predict.gam lpmatrix for prediction outside of R
This is in regards to the suggested use of type="lpmatrix" in the documentation for mgcv::predict.gam. Could one not get the same result more simply by using type="terms" and interpolating each term directly? What is the advantage of the lpmatrix approach for prediction outside R? Thanks. -- View this message in context:
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
2007 Mar 16
3
ARIMA standard error
Hi, Can anyone explain how the standard error in arima() is calculated? Also, how can I extract it from the Arima object? I don't see it in there. > x <- rnorm(1000) > a <- arima(x, order = c(4, 0, 0)) > a Call: arima(x = x, order = c(4, 0, 0)) Coefficients: ar1 ar2 ar3 ar4 intercept -0.0451 0.0448 0.0139 -0.0688 0.0010 s.e.