similar to: S+ style implementation of GAM for R?

Displaying 20 results from an estimated 2000 matches similar to: "S+ style implementation of GAM for R?"

2003 Nov 25
1
Y axis scale in plot.gam
Hi, Is there any way to change the y axis range of values in a plot.gam()? I need that two different GAM plots to be of the same scale. Also, it is possible to change the labels? I tried with "ylab" and "ylim" and did not work Thanks in advance Ricardo Lopes Ricardo Lopes ............................................. Instituto do Mar Departamento de Zoologia
2003 Jun 05
1
partial residuals in plot.gam()
All, Sorry for bombarding you with GAM related questions, but... I know a partial residual option in plot.gam() is on Simon Wood's todo list, but since I'm in the midst of a project and not yet having acquired sufficient R knowledge to code something usable myself I'll have to put my trust in you. Anybody got some code lying around for doing this? Or if someone can supply me with
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,
2004 Mar 12
1
GCV UBRE score in GAM models
hello to everybody: I would to know with ranges of GCV or UBRE values can be considered as adequate to consider a GAM as correct Thanks in advance -- David Nogu?s Bravo Functional Ecology and Biodiversity Department Pyrenean Institute of Ecology Spanish Research Council Av. Monta?ana 1005 Zaragoza - CP 50059 976716030 - 976716019 (fax)
2004 Jun 16
2
gam
hi, i'm working with mgcv packages and specially gam. My exemple is: >test<-gam(B~s(pred1)+s(pred2)) >plot(test,pages=1) when ploting test, you can view pred1 vs s(pred1, edf[1] ) & pred2 vs s(pred2, edf[2] ) I would like to know if there is a way to access to those terms (s(pred1) & s(pred2)). Does someone know how? the purpose is to access to equation of smooths terms
2005 Feb 27
1
prediction, gam, mgcv
I fitted a GAM model with Poisson distribution using the function gam() in the mgcv package. My model is of the form: mod<-gam(y~s(x0)+s(x1)+s(x2),family=poisson). To extract estimates at a specified set of covariate values I used the gam `predict' method. But I want to get estimate and standard error of the difference of two fitted values. Can someone explain what should I do? Thank
2005 Jan 13
2
GAM: Remedial measures
I fitted a GAM model with Poisson distribution to a data with about 200 observations. I noticed that the plot of the residuals versus fitted values show a trend. Residuals tend to be lower for higher fitted values. Because, I'm dealing with count data, I'm thinking that this might be due to overdispersion. Is there a way to account for overdispersion in any of the packages MGCV or GAM?
2003 May 16
2
glm and gam confidence intervals
How can I obtain the values of confidence intervals from gam anf glm objects? Thanks in advance -- David Nogu?s Bravo Functional Ecology and Biodiversity Department Pyrenean Institute of Ecology Spanish Research Council Av. Monta?ana 1005 Zaragoza - CP 50059 976716030 - 976716019 (fax)
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
2005 Feb 14
1
gam(mgcv) starting values
Hi all! I?ve got some problems with the function gam (library mgcv). For some models I get the error message : Error: no valid set of coefficients has been found:please supply starting values In addition: Warning message: NaNs produced in: log(x) This is a shortened code I used: gam(y ~ M1 + M3 + M4 + M5 + M6 + sex + M1*M3 + s(age), family=Gamma(link ="identity"), weights=days) If
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
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
2003 Apr 21
3
significant terms in spline model using GAM
Hi.. I'm using gam() to fit a spline model for a data set that has two predictor variables (say A and B). The results indicate that the higher order interaction terms are significant. The R^2 jumps from .5 to .9 when I change the maximum order for the interaction from 10 to 15 (i.e. (AB)^10 to (AB)^15). Is there any way of finding out which of the terms in the model are really
2003 Jan 30
2
mgcv, gam
Hola! I have some problems with gam in mgcv. Firts a detail: it would be nice igf gam would accept an na.action argument, but that not the main point. I want to have a smooth term for time over a year, the same pattern repeating in succesive years. It would be natural then to impose the condition s(0)=s(12). Is this possible within mgcv? I tried to obtain this with trigonometric terms, aca:
2003 Oct 31
1
constrained nonlinear optimisation in R?
Hello. I have searched the archives but have not found anything. I need to solve a constrained optimisation problem for a nonlinear function (“maximum entropy formalism”). Specifically, Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities, conditional on a series of constraints of the form: SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are constraints on
2003 Apr 07
3
spline with multiple predictor vars?
Hi, is there a way in R to generate a polynomial spline with multiple predictor variables? I have one response and two predictors and I'm trying to fit a spline model for this... Please cc me on the reply.. Thanks, nirmal
2003 Sep 26
1
least squares regression using (inequality) restrictions
Dear R Users, I would like to make a lesast squares regression similar to that what is done by the command "lm". But additionally, I would like to impose some restrictions: 1) The sum of all regression coefficients should be equal to 1. 2) Each coefficient should assume a value between 0 and 1. (inequality restrictions) Which command is the best to use in order to solve this problem
2004 Mar 09
4
help
Hello, I am a new member, and I need your help. For my work (thesis), I use the package rpart to construct trees. But, to continu my studies, I need to calcule the 'variable importance'. But, I don't find a program to do this in the implementation of R. Is there someone who know if there exist a program which calculate the 'variable importance', notion defined by Breiman and
2004 Sep 24
3
geographically weighted glm
Hi all, I am interested in obtaining R code related to geographically weighted regression. In particular, I am interested in building geographically weighted Poisson GLMs. The model will contain categorical and continuous x independent variables, with interaction effects between categorical and continuous variables. Anybody have anything I can look at? thanks, Mark. --
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