similar to: gam()

Displaying 20 results from an estimated 7000 matches similar to: "gam()"

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
2005 Sep 26
4
p-level in packages mgcv and gam
Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result
2003 Jun 19
2
Grouping binary data
Dear all, I'm analyzing a binary outcome using glm() with a binomial distribution and a logit link, and have now reached the point where I'd like to do some model checking. Since my data are in binary form I'd like to collapse over the cross-classification of the factors before the model checking. Are there any nice and simple ways doing this? If so, how? If not, I'd be
2003 Sep 16
2
gam and concurvity
Hello, in the paper "Avoiding the effects of concurvity in GAM's .." of Figueiras et al. (2003) it is mentioned that in GLM collinearity is taken into account in the calc of se but not in GAM (-> results in confidence interval too narrow, p-value understated, GAM S-Plus version). I haven't found any references to GAM and concurvity or collinearity on the R page. And I
2002 Nov 13
2
Comparing GAM objects using ANOVA
Hi, Is it possible to compare two GAM objects created with the gam() function from the mgcv package. I use a slightly modified version of anova.glm() named anova.gam(), modified from John Fox (2002). It often gives me some aberant responses, especially with "F" test. I use a quasibinomial model and scale (dispersion) is calculated and used in the calculation of the F value. Does someone
2007 Apr 03
3
Testing additive nonparametric model
I have estimated a multiple nonparametric regression using the loess command in R. I have also estimated an additive version of the model using the gam function. Is there a way of using the output of these two models to test the restrictions imposed by the additive model?
2004 Oct 12
3
need help on GAM
Get some question about the function "gam". Suppose I have a semiparametric model, Y~x1+x2+s(z1). Using "gam", how could I get the estimates for the parametric part and nonparametric part respectively? And another question: we could find the coefficients for both parametric term and nonparametric term, what do these coefficients for the nonparametric term stand for, the
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
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
2006 Jan 19
2
gam
Dear R users, I'm new to both R and to this list and would like to get advice on how to build generalized additive models in R. Based on the description of gam, which I found on the R website, I specified the following model: model1<-gam(ST~s(MOWST1),family=binomial,data=strikes.S), in which ST is my binary response variable and MOWST1 is a categorical independent variable. I get the
2008 Aug 20
5
GAM-binomial logit link
Dear all, I'm using a binomial distribution with a logit link function to fit a GAM model. I have 2 questions about it. First i am not sure if i've chosen the most adequate distribution. I don't have presence/absence data (0/1) but I do have a rate which values vary between 0 and 1. This means the response variable is continuous even if within a limited interval. Should i use
2011 Aug 01
1
Problem with gam() after R update
Dear group, I experience s?ome problems with gam() function after R update to version 2.13.1 The function in both gam and mgcv packages stopped to work. Before, with the same code I used, everything was fine. The function from gam package yields following warning: Residual degrees of freedom are negative or zero. This occurs when the sum of the parametric and nonparametric degrees of freedom
2002 Jan 28
6
Almost a GAM?
Hello: I sent this question the other day with the wrong subject heading and couple typos, with no response. So, here I go again, having made those corrections. I would like to estimate, for lack of a better description, a partially additive non-parametric model with the following structure: z~ f(x,y):w1 + g(x,y):w2 + e In other words, I'd like to estimate the marginals with respect to
2005 Nov 23
1
1st derivative {mgcv} gam smooth
Dear R-hep, I'm trying to get the first derivative of a smooth from a gam model like: model<-gam(y~s(x,bs="cr", k=5)+z) and need the derivative: ds(x)/dx. Since coef(model) give me all the parameters, including the parameters of the basis, I just need the 1st derivative of the basis s(x).1, s(x).2, s(x).3, s(x).4. If the basis were generated with the function
2001 May 16
2
bivariate function in gam model
R-users -- I would be interested in tools in R to fit the following gam model: logit(p) = a + f(x1) + f(x2) + f(x1,x2), where f(x1,x2) defines a surface. I have looked into the mgcv library, but it seems only to fit models of the form: logit(p) = a + f(x1) + f(x2) Any ideas? Cheers, Dan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Dan Powers Associate Professor,
2007 Feb 28
2
Help on GAM
1) I have a semiparametric model, like *Y~x1+s(x2)+s(x3)* When I rum gam package I only obtained the estimates and the statistics of the nonparametric part. How can I get the parametric part? Please could you give me the complete comand to do it. 2) How are the negative coefficients identified. I run different examples and I never got any negative parameters. Thank you, Dacha [[alternative
2002 Sep 10
2
Hat values for generalized additive models
Would anyone be able to provide insight for the following question, please? Setting: estimation of prediction intervals for age-period-cohort models using GAMs (rate ~ s(age,period)) Method: bootstrap (Davison and Hinkley, 1997) Issue: standardisation of the residuals for resampling requires an adjustment using the diagonals of the hat matrix. Is there a simple way to get the hat values out of a
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action = na.exclude) To compare these two GLM
2006 Dec 04
1
GAM model selection and dropping terms based on GCV
Hello, I have a question regarding model selection and dropping of terms for GAMs fitted with package mgcv. I am following the approach suggested in Wood (2001), Wood and Augustin (2002). I fitted a saturated model, and I find from the plots that for two of the covariates, 1. The confidence interval includes 0 almost everywhere 2. The degrees of freedom are NOT close to 1 3. The partial
2004 Jan 19
2
Relative risk using GAM
I am a new user of R. I am trying to fit gam model with our air pollution data. I used Foreign package to call data from SPSS and used MGCV package to fit gam. The following are the steps I used: > dust<- read.spss("a:dust9600jan.sav") > c<-gam(MRESPALL~s(DUSTM)+s(TEMP)+s(RH),family=poisson,data=dust) > summary(c) Family: poisson Link function: log Formula: MRESPALL ~