similar to: gam and concurvity

Displaying 20 results from an estimated 4000 matches similar to: "gam and concurvity"

2003 Sep 14
3
Re: Logistic Regression
Christoph Lehman had problems with seperated data in two-class logistic regression. One useful little trick is to penalize the logistic regression using a quadratic penalty on the coefficients. I am sure there are functions in the R contributed libraries to do this; otherwise it is easy to achieve via IRLS using ridge regressions. Then even though the data are separated, the penalized
2003 Jun 04
2
gam()
Dear all, I've now spent a couple of days trying to learn R and, in particular, the gam() function, and I now have a few questions and reflections regarding the latter. Maybe these things are implemented in some way that I'm not yet aware of or have perhaps been decided by the R community to not be what's wanted. Of course, my lack of complete theoretical understanding of what
2012 Jul 14
1
GAM Chi-Square Difference Test
We are using GAM in mgcv (Wood), relatively new users, and wonder if anyone can advise us on a problem we are encountering as we analyze many short time series datasets. For each dataset, we have four models, each with intercept, predictor x (trend), z (treatment), and int (interaction between x and z). Our models are Model 1: gama1.1 <- gam(y~x+z+int, family=quasipoisson) ##no smooths Model
2003 Jun 05
2
ridge regression
Hello R-user I want to compute a multiple regression but I would to include a check for collinearity of the variables. Therefore I would like to use a ridge regression. I tried lm.ridge() but I don't know yet how to get p-values (single Pr() and p of the whole model) out of this model. Can anybody tell me how to get a similar output like the summary(lm(...)) output? Or if there is
2003 Jul 14
1
gam and step
hello, I am looking for a step() function for GAM's. In the book Statistical Computing by Crawley and a removal of predictors has been done "by hand" model <- gam(y ~s(x1) +s(x2) + s(x3)) summary(model) model2 <- gam(y ~s(x2) + s(x3)) # removal of the unsignificant variable #then comparing these two models if an significant increase occurs. anova(model, model2,
2008 Jan 08
3
GAM, GLM, Logit, infinite or missing values in 'x'
Hi, I'm running gam (mgcv version 1.3-29) and glm (logit) (stats R 2.61) on the same models/data, and I got error messages for the gam() model and warnings for the glm() model. R-help suggested that the glm() warning messages are due to the model perfectly predicting binary output. Perhaps the model overfits the data? I inspected my data and it was not immediately obvious to me (though I
2009 Jan 16
2
Predictions with GAM
Dear, I am trying to get a prediction of my GAM on a response type. So that I eventually get plots with the correct values on my ylab. I have been able to get some of my GAM's working with the example shown below: * model1<-gam(nsdall ~ s(jdaylitr2), data=datansd) newd1 <- data.frame(jdaylitr2=(244:304)) pred1 <- predict.gam(model1,newd1,type="response")* The problem I am
2011 Dec 09
3
gam, what is the function(s)
Hello, I'd like to understand 'what' is predicting the response for library(mgcv) gam? For example: library(mgcv) fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial) xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101) plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l") I want to see the generalized function(s) used to predict the response
2012 Oct 02
1
Parametric effects in GAM
Hello! Can anyone give a tip how to plot parametric effects in an Generalized Additive Model, from mgcv package? Thanks, PM
2003 Jan 07
1
help interpreting output?
Dear R experts, I'm hoping someone can help me to interpret the results of building gam's with mgcv in R. Below are summaries of two gam's based on the same dataset. The first gam (named "gam.mod") has six predictor variables. The second gam (named "gam.mod2") is exactly the same except it is missing one of the predictor variables. What is confusing me is
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
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
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
2008 Aug 03
1
output components of GAM
I would like to request help with the following: I am trying to use a Generalized Additive Model (gam) to examine the density distribution of fish as a function of latitude and longitude as continuous variables, and year as a categorical variable. The model is written as:   gam.out   <-  gam(Density ~ s(Lat) + s(Lon) + as.factor(Year))   The fitted model prediction of the link function is
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).
2004 Dec 01
2
step.gam
Dear R-users: Im trying (using gam package) to develop a stepwise analysis. My gam object contains five pedictor variables (a,b,c,d,e,f). I define the step.gam: step.gam(gamobject, scope=list("a"= ~s(a,4), "b"= ~s(b,4), "c"= ~s(c,4), "d"= ~s(d,4), "e"= ~s(e,4), "f"= ~s(f,4))) However, the result shows a formula containing the whole
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 Aug 22
2
AIC for GAM models
Dear all, I am analysing growth data - response variable - using GAM and GAMM models, and 4 covariates: mean size, mean capture year, growth interval, having tumors vs. not The models work fine, and fit the data well, however when I try to compare models using AIC I cannot get an AIC value. This is the code for the gam model:
2012 Apr 03
1
how to use condition indexes to test multi-collinearity
Dear Users, I try to calculate condition indexes and variance decomposition proportions in order to test for collinearity using colldiag() in perturb package, I got a large index and two variables with large variance decomposition proportions,but one of them is constant item.I also checked the VIF for that variable, the value is small.The result is as follows: Index intercept V1
2008 Jul 09
1
plot gam "main effect functions" in one graph
Dear R users, I have a question about the plot with the package gam. I need to plot different main effect functions, related to different gam models, in the same graphics (i.e. the same covariate about different models). I used the plot.gam e preplot.gam documentations. Using preplot.gam I can plot the single function but I'm not able to put all the functions together. Does anybody can help