search for: gcv

Displaying 20 results from an estimated 128 matches for "gcv".

Did you mean: gcc
2007 Apr 08
1
Relative GCV - poisson and negbin GAMs (mgcv)
I am using gam in mgcv (1.3-22) and trying to use gcv to help with model selection. However, I'm a little confused by the process of assessing GCV scores based on their magnitude (or on relative changes in magnitude). Differences in GCV scores often seem "obvious" with my poisson gams but with negative bi...
2012 Feb 13
3
mgcv: increasing basis dimension
hi Using a ts or tprs basis, I expected gcv to decrease when increasing the basis dimension, as I thought this would minimise gcv over a larger subspace. But gcv increased. Here's an example. thanks for any comments. greg #simulate some data set.seed(0) x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) linp<--...
2005 Nov 17
3
loess: choose span to minimize AIC?
Is there an R implementation of a scheme for automatic smoothing parameter selection with loess, e.g., by minimizing one of the AIC/GCV statistics discussed by Hurvich, Simonoff & Tsai (1998)? Below is a function that calculates the relevant values of AICC, AICC1 and GCV--- I think, because I to guess from the names of the components returned in a loess object. I guess I could use optimize(), or do a simple line search on sp...
2011 May 13
0
Tps error
Hi, I am trying to use the Tps procedure to visualize 3 variables in XYZ space, but keep getting the error messages below: Warning messages: 1: In Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV, Krig.fgcv, : GCV search gives a minimum at the endpoints of the grid search 2: In Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV.one, Krig.fgcv.one, : GCV search gives a minimum at the endpoints of the grid search This is the code I am using: tpsfit <...
2007 Jun 04
0
Local polynomial regression using locfit
I have a dataset of pregnancy values for multiple years (and ages, not included) with missing years. I would like to use local polynomial regression to smooth the values and estimate for the missing years. I would also like to use GCV to justify the smoothing parameter selection. When using locfit() with lp() I found that the gcvplot function does not work as it is looking for an alpha value to replace so I used gcv(): ######################################################################## # library(locfit) ### approx. my da...
2012 Aug 08
1
mgcv and gamm4: REML, GCV, and AIC
...;ve been using gamm4 to build GAMMs for exploring environmental influences on genetic ancestry. Things have gone well and I have 2 very straightforward questions: 1. I've used method=REML. Am I correct that this is an alternative method for estimating the smooth functions in GAMMs rather than GCV that is often used for GAMs? I've read up on REML and it makes sense, but I'm confused about whether GCV is used for any part of the model formation of a GAMM with method=REML. I think it is not. Is this why no GCV score is returned for GAMMs through mgcv and gamm4? For Gams I've al...
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 residuals from...
2002 May 16
1
Tps
Hi, I have a 4 column file (long/lat/elev/variable) and I tried to fit the values of my variable to the XYZ space using Tps and I keep getting the following message: Warning messages: 1: GCV search gives a minumum at the endpoints of the grid search in: Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV, Krig.fgcv, 2: GCV search gives a minumum at the endpoints of the grid search in: Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV.one, Krig.fgcv.one, 3: Failed to find the upcrossing i...
2003 Apr 25
2
Apparent namespace problem
...but if I execute it it works another way. The statement is clusterEvalQ(cl, crossval.setup(x, y, groups, theta.fit, theta.predict)) This evaluates the crossval.setup function across the cluster cl. crossval.setup is a function which puts its arguments in a list g (a local variable) and then does gcv <<- g. The intent is to stuff the data into a global variable for use by later function calls. When I execute the statement interactively, even in the debugger in the function that executes the statement, it seems to work. But if it executes in the function, gcv appears to remain unset. I...
2013 Apr 27
1
Selecting ridge regression coefficients for minimum GCV
...ws: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=seq(0,10,0.01)) Then I enter : select(reg) and it returns: modified HKB estimator is 19.3409 modified L-W estimator is 36.18617 smallest value of GCV at 10 I think it means that it is advisable to use the results of regression corresponding to lambda= 10; so the next thing I do is: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=10) which yields: final$lag1 final$lag2 final$g fina...
2012 Sep 25
1
REML - quasipoisson
...led as to the relation between the REML score computed by gam and the formula (4) on p.4 here: http://opus.bath.ac.uk/22707/1/Wood_JRSSB_2011_73_1_3.pdf I'm ok with this for poisson, or for quasipoisson when phi=1. However, when phi differs from 1, I'm stuck. #simulate some data library(mgcv) set.seed(1) x1<-runif(500) x2<-rnorm(500) linp<--0.5+x1+exp(-x2^2/2)*sin(4*x2) y<-rpois(500,exp(linp)) ##poisson #phi=1 m1<-gam(y~s(x1)+s(x2),family="poisson",method="REML") phi<-m1$scale #formula #1st term S1<-m1$smooth[[1]]$S[[1]]*m1$sp[1] S2<-m1$smo...
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)
2009 Mar 31
1
CV and GCV for finding smoothness parameter
...ck. The model I chose can be found in here: myknots6 = c(20,24,34) p.spline8 = spm(accel ~ f(times,basis="trunc.poly",degree=2,knots=myknots6)) Can someone please help me with this task? I'm kind of desperate. Thank you! -- View this message in context: http://www.nabble.com/CV-and-GCV-for-finding-smoothness-parameter-tp22804957p22804957.html Sent from the R help mailing list archive at Nabble.com.
2008 Feb 14
0
GCV in lm.ridge (MASS) (PR#10755)
Full_Name: Andrew Robinson Version: 2.6.2 Patched (2008-02-12 r44439) OS: FreeBSD 6.3-RC1 Submission from: (NULL) (211.28.206.186) I believe that the computation for GCV is incorrect in the lm.ridge function in MASS. >From lm.ridge: GCV <- colSums((Y - X %*% coef)^2)/ (n - colSums(matrix(d^2/div, dx)))^2 The denominator does not tally with the formula on p. 141 of Ripley's Pattern Recognition & Neural Networks. I think that it should be GC...
2005 Sep 23
1
Smooth terms significance in GAM models
hi, i'm using gam() function from package mgcv with default option (edf estimated by GCV). >G=gam(y ~ s(x0, k = 5) + s(x1) + s(x2, k = 3)) >SG=summary(G) Formula: y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3) Parametric coefficients: Estimate std. err. t ratio Pr(>|t|) (Intercept) 3.462e+07 1.965e+05 176.2...
2012 Oct 01
0
[Fwd: REML - quasipoisson]
...eralized Linear Models 2nd ed, section 9.6) in place of the likelihood/quasi-likelihood in the expression for the (RE)ML score. I hadn't realised that this was possible before the paper was published. best, Simon ps. sorry for slow reply, the original message slipped through my filter for mgcv related stuff > hi > > I'm puzzled as to the relation between the REML score computed by gam and > the formula (4) on p.4 here: > http://opus.bath.ac.uk/22707/1/Wood_JRSSB_2011_73_1_3.pdf > > I'm ok with this for poisson, or for quasipoisson when phi=1. > > Howev...
2004 Mar 03
8
need help with smooth.spline
Dear R listers, When using smooth.spline to interpolate data, results are generally good. However, some cases produce totally unreasonable results. The data are values of pressure, temperature, and salinity from a probe that is lowered into the ocean, and the objective is to interpolate temperature and salinity to specified pressures. While smooth.spline provides excellent values at the
2002 Sep 10
2
Hat values for generalized additive models
...rdisation 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 GAM object? Looking through the code, I couldn't see anywhere where the hat matrix is constructed. I tried the appended patch (against mgcv_0.8-1.tar.gz). This returns sensible hat values for normal errors, however the hat values using Poisson data don't look as good: require(mgcv) x=seq(0,1,length=1001) mu=x y=rnorm(1001,mu) plot(gam(y~s(x))$hat,hat(glm(y~x)$qr)) y=rpois(1001,exp(mu)) plot(gam(y~s(x),family=poisson)$hat,hat(glm...
2020 Apr 28
2
mclapply returns NULLs on MacOS when running GAM
Dear R-devel, I am experiencing issues with running GAM models using mclapply, it fails to return any values if the data input becomes large. For example here the code runs fine with a df of 100 rows, but fails at 1000. library(mgcv) library(parallel) > df <- data.frame( + x = 1:100, + y = 1:100 + ) > > mclapply(1:2, function(i, df) { + fit <- gam(y ~ s(x, bs = "cs"), data = df) + }, + df = df, + mc.cores = 2L + ) [[1]] Family: gaussian Link function: identity Formula: y...
2003 Sep 30
2
cluster & mgcv update
Hello, After reinstalling the whole OS and R as well, I tried to update.packages() and get the follwing error message: concerning the mgcv update: atlas2-base is installed and blas as well (on debian). I haven't found lf77blas, I assume it's a library or something similar associated with blas. any suggestion how to solve that, thanks Martin * Installing *source* package 'cluster' ... ** libs gcc -I/usr/lib/R/inclu...