similar to: use of step.gam (from package 'gam') and superassignment inside functions

Displaying 20 results from an estimated 4000 matches similar to: "use of step.gam (from package 'gam') and superassignment inside functions"

2005 Oct 12
0
step.gam- question
This is covered in the helpfile, but perhaps not clearly enough. The gam chapter in the "white book" has more details. step.gam moves around the terms in the scope aregumnet in an ordered fashion. So if a scope element is ~ 1 + x +s(x,4) + s(x,8) and the formula at some stage is ~ x + .... then if direction="both", the routine checks both "1" and
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,
2010 Jul 07
0
error in step.gam
Dear r-helpers, I use function step.gam (package gam, T. Hastie) with several explanatory variables to build a model. Unfortunately, I obviously have too many variables. This message occurs on my 4 core 64bit machine with 8GB RAM in R2.11.1 for Windows (64bit build): Error in array(FALSE, term.lengths) : 'dim' specifies too large an array I read that this message occurs when running out
2005 Apr 06
0
Version 0.93 of GAM package on CRAN
I have posted an update to the GAM package. Note that this package implements gam() as described in the "White" S book (Statistical models in S). In particular, you can fit models with lo() terms (local regression) and/or s() terms (smoothing splines), mixed in, of course, with any terms appropriate for glms. A number of bugs in version 0.92 have been fixed; notably 1) some problems
2005 Apr 06
0
Version 0.93 of GAM package on CRAN
I have posted an update to the GAM package. Note that this package implements gam() as described in the "White" S book (Statistical models in S). In particular, you can fit models with lo() terms (local regression) and/or s() terms (smoothing splines), mixed in, of course, with any terms appropriate for glms. A number of bugs in version 0.92 have been fixed; notably 1) some problems
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
2005 Sep 02
2
Superassignment (<<-) and indexing
In a clean environment under R-2.1.0 on Linux: > x <- 1:5 > x[3] <<- 9 Error: Object "x" not found Isn't that odd? (Note x <<- 9 works just fine.) Why am I doing this? Because I'm stepping through code that normally lives inside a function, where "<<-" is appropriate. -- David Brahm (brahm at alum.mit.edu)
2007 Feb 27
1
interactions and GAM
Dear R-users, I have 1 remark and 1 question on the inclusion of interactions in the gam function from the gam package. I need to fit quantitative predictors in interactions with factors. You can see an example of what I need in fig 9.13 p265 from Hastie and Tibshirani book (1990). It's clearly stated that in ?gam "Interactions with nonparametric smooth terms are not fully
2010 Jul 27
0
gam (package gam) - diagonal of smoother matrix
Dear R-list members, Once a gam (package gam) model has been fitted with family=poisson, is there some R function that could extract the diagonal elements of the smoother matrix S, to be used in a cross-validation for the selection of the best smoothing parameter, following equation 3.19 on page 48 of the book T.J. Hastie and R.J. Tibshirani, Generalized Additive Models, Chapman and Hall/CRC,
2023 Mar 19
1
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
I think that should be the default behaviour. It's pretty late to get that into R 4.3.0, but I think your proposal (with check.superassignment = FALSE being the default) could make it in, and 4.4.0 could change the default to TRUE. Duncan On 19/03/2023 12:08 p.m., Henrik Bengtsson wrote: > I'd like to be able to prevent the <<- assignment operator ("super >
2023 Mar 19
1
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
I'd like to be able to prevent the <<- assignment operator ("super assignment") from assigning to the global environment unless the variable already exists and is not locked. If it does not exist or is locked, I'd like an error to be produced. This would allow me to evaluate expressions with this temporarily set to protect against mistakes. For example, I'd like to
2023 Mar 19
1
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
I have to say <<- is a core debugging tool when assigning into the global environment. I suppose I could use assign but that would be somewhat annoying. That said I'm still for this change, the vast overwhelming number of times that <<- is in my package code - already rare but it does happen - it would absolutely be a bug (typo most likely) for it to get to the global environment
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 Oct 12
1
step.gam and number of tested smooth functions
Hi, I'm working with step.gam in gam package. I'm interested both in spline and lowess functions and when I define all the models that I'm interested in I get something like that: > gam.object.ALC<-gam(X143S~ALC,data=dane,family=binomial) >
2023 Mar 19
2
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
Why should it make an exception for cases where the about-to-be-assigned-to name is present in the global environment? I think it should warn or give an error if the altered variable is in any environment on the search list. -Bill On Sun, Mar 19, 2023 at 10:54?AM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > I think that should be the default behaviour. It's pretty late to
2008 Jun 25
0
subscripted assignments errormessage in gap.boxpot
I am trying to create a boxplot that has a gap with different scales so that my boxes actually show (compare attachments). I have referred to the help pages for gap.boxplot, gap.plot, list with no luck so far. Here is my script and the resulting error message: # Import *.csv files containing areas for each CLI class cli3<-read.table("F:\\Megan\\cli3.csv", header=TRUE,
2009 Feb 04
2
loading lme4 fails - "function 'cholmod_l_start' not provided by package 'Matrix'"
Hello UseRs, I've just tried to load the lme4 package and got the error message, "function 'cholmod_l_start' not provided by package 'Matrix'". I downloaded the latest version of lme4 and its required packages (lattice and Matrix) as suggested in the archives and still got this message. The FAQ and archives suggested to check the R version requirements, but I'm
2008 Aug 08
2
Tick marks that correspond with bars on barplot
Hello all, I have created a barplot that shows change in hardwood/softwood density from 1965 to 2005 in 5 year periods (1965,1970, etc). I would like to have an X-axis where the labels for the years line up after every two bars in the plot (there is one bar for hardwood, and another for softwood). Below is my script: density<-read.table("F:\\Megan\\Vtest.csv", header=TRUE,
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,