similar to: problems in package gam

Displaying 20 results from an estimated 10000 matches similar to: "problems in package gam"

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
2007 Dec 13
1
Two repeated warnings when runing gam(mgcv) to analyze my dataset?
Dear all, I run the GAMs (generalized additive models) in gam(mgcv) using the following codes. m.gam <-gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbinary,family=binomial(logit),data=point) And two repeated warnings appeared. Warnings$B!'(B 1: In gam.fit(G, family = G$family, control = control, gamma = gamma, ... : Algorithm did not converge 2: In gam.fit(G,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
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
2001 Dec 22
2
gam plots
Dear R users, Using the library(mgcv) and running R under MacOSX, I have fitted a generalised additive model with binomial errors in order to check the linearity of two continuous variables ap2mm and diffdaysm in a glm: > mymodel.gam <- gam(diedhos~ s(ap2mm) + Dweekm + s(diffdaysm) + Dweekm:diffdaysm + ap2mm:Dweekm, binomial) I would like postscript gam plots for the two smoothed
2005 Oct 05
3
testing non-linear component in mgcv:gam
Hi, I need further help with my GAMs. Most models I test are very obviously non-linear. Yet, to be on the safe side, I report the significance of the smooth (default output of mgcv's summary.gam) and confirm it deviates significantly from linearity. I do the latter by fitting a second model where the same predictor is entered without the s(), and then use anova.gam to compare the
2013 Jun 17
1
Can you use two offsets in gam (mgcv)?
Hello, I have been trying to find out whether it is possible to use more than one offset in a gam (in mgcv). The reason I would like to do this is to 1) account for area surveyed in a Poisson model of sightings of porpoises within defined grid cells (each cell has a slightly different area) and 2) account for detection probability within each grid cell (some grid cells are further away from the
2013 Dec 05
0
mgcv gam modeling trend variation over cases
Dear R-Helpers, I posted two days ago on testing significance of random effects in mgcv, but realize I did not make my overall purpose clear. I have a series of N short time series, where N might range from 3-10 and short means a median of 20 time points. The sample data below (PCP) has N = 4 cases with 9, 13, 16 and 16 observations over time respectively. The data set contains four
2023 Dec 06
0
How to calculate relative risk from GAM model in mgcv package?
Hi R users,I am a beginner in the use of R. I need urgent help for my thesis study. <https://stats.stackexchange.com/posts/633206/timeline> I have daily air pollution parameters PM10, PM2.5 CO, NO2, SO2, and O3. I also have daily hospital admission numbers. Taking into account the effect of weekends and holidays, I would like to used generalised additive model (GAM) to explore the
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
2006 Jun 18
1
GAM selection error msgs (mgcv & gam packages)
Hi all, My question concerns 2 error messages; one in the gam package and one in the mgcv package (see below). I have read help files and Chambers and Hastie book but am failing to understand how I can solve this problem. Could you please tell me what I must adjust so that the command does not generate error message? I am trying to achieve model selection for a GAM which is required for
2012 Nov 29
1
[mgcv][gam] Manually defining my own knots?
Dear List, I'm using GAMs in a multiple imputation project, and I want to be able to combine the parameter estimates and covariance matrices from each completed dataset's fitted model in the end. In order to do this, I need the knots to be uniform for each model with partially-imputed data. I want to specify these knots based on the quantiles of the unique values of the non-missing
2008 Jun 05
1
GAM hurdle models
Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial distribution. It occurs to me that using the negative binomial distribution on data with no zeros is not right, as the negative binomial allows zeros.
2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL: http://people.bath.ac.uk/sw283/mgcv/) shows a general equation log{E(yi )} = ?+ ?xi + f (zi ) . What I would like to do is put my model coefficients and present the equation used. I am an
2007 Jul 24
2
plotting gam models
Hi everybody, I am working with gams and I have found some questions when plotting gams models. I am using mgcv, and my model looks something like this: model<- gam(x ~ s(lat,long)) I can plot the output of the model using plot(model) or plot.gam(model) and I get a surface plot. That is ok, but what I want to do now is to extract the data used to perform the surface plot. Like that I
2011 Nov 10
0
Help with gam
From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de <mailto:ligges_at_statistik.tu-dortmund.de?Subject=Re:%20[R]%20Help%20with%2 0gam> > Date: Wed, 11 May 2011 19:08:38 +0200 On 11.05.2011 17:22, Zsolt Macskasi wrote: > Hi, > <http://tolstoy.newcastle.edu.au/R/e14/help/11/05/1036.html#1040qlink1> > I am a brand new user of R and I am trying to use the gam
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"
2007 Oct 04
1
Convergence problem in gam(mgcv)
Dear all, I'm trying to fit a pure additive model of the following formula : fit <- gam(y~x1+te(x2, x3, bs="cr")) ,with the smoothing parameter estimation method "magic"(default). Regarding this, I have two questions : Question 1 : In some cases the value of "mgcv.conv$fully.converged" becomes "FALSE", which tells me that the method stopped with a
2006 Mar 05
1
predicted values in mgcv gam
Hi, In fitting GAMs to assess environmental preferences, I use the part of the fit where the lower confidence interval is above zero as my criterion for positive association between the environmental variable and species abundance. However I like to plot this on the original scale of species abundance. To do so I extract the fit and SE using predict.gam. Lately I compared more