Displaying 20 results from an estimated 10000 matches similar to: "[Fwd: Re: the mgcv package can not be loaded]"
2011 May 25
3
Processing large datasets
Hi R list,
I'm new to R software, so I'd like to ask about it is capabilities.
What I'm looking to do is to run some statistical tests on quite big
tables which are aggregated quotes from a market feed.
This is a typical set of data.
Each day contains millions of records (up to 10 non filtered).
2011-05-24 750 Bid DELL 14130770 400
15.4800 BATS
2010 May 19
1
Displaying smooth bases - mgcv package
Dear all,
for demonstration purposes I want to display the basis functions used by a
thin plate regression spline in a gamm model. I've been searching the help
files, but I can't really figure out how to get the plots of the basis
functions. Anybody an idea?
Some toy code :
require(mgcv)
require(nlme)
x1 <- 1:1000
x2 <- runif(1000,10,500)
fx1 <- -4*sin(x1/50)
fx2 <-
2010 Jun 16
3
mgcv, testing gamm vs lme, which degrees of freedom?
Dear all,
I am using the "mgcv" package by Simon Wood to estimate an additive mixed
model in which I assume normal distribution for the residuals. I would
like to test this model vs a standard parametric mixed model, such as the
ones which are possible to estimate with "lme".
Since the smoothing splines can be written as random effects, is it
correct to use an (approximate)
2011 Mar 10
2
ERROR: gamm function (mgcv package). attempt to set an attribute on NULL
Hello:I run a gamm with following call :mode<-gamm(A~B,random=list(ID=~1),family=gaussian,na.action=na.omit,data=rs)an error happened:ERROR names(object$sp) <- names(G$sp) : attempt to set an attribute on NULLwith mgcv version 1.7-3What so? How can I correct the Error? Thanks very much for any help.
[[alternative HTML version deleted]]
2010 Feb 04
3
mgcv problem
Dear friends,
I have install the last version 2.10 and now I have probles with 'mgcv' which can be load. I proved to eliminated and reinstalled but always obtain the same message:
> library (mgcv)
This is mgcv 1.6-1. For overview type `help("mgcv-package")'.
Error in runif(1) :
.Random.seed is not an integer vector but of type 'list'
Error : .onAttach non
2009 Feb 13
2
loading mgcv package
Hi ,When I try to load the 'mgcv" package, often, but not always, get this
error message. What am I doing wrong?
__________________
This is mgcv 1.4-1.1
Error in runif(1) :
.Random.seed is not an integer vector but of type 'list'
Error : .onAttach failed in 'attachNamespace'
Error: package/namespace load failed for 'mgcv'
-----------------------------------------
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,
2008 May 06
1
mgcv::gam shrinkage of smooths
In Dr. Wood's book on GAM, he suggests in section 4.1.6 that it might be
useful to shrink a single smooth by adding S=S+epsilon*I to the penalty
matrix S. The context was the need to be able to shrink the term to zero if
appropriate. I'd like to do this in order to shrink the coefficients towards
zero (irrespective of the penalty for "wiggliness") - but not necessarily
all the
2008 Jun 11
1
mgcv::gam error message for predict.gam
Sometimes, for specific models, I get this error from predict.gam in library
mgcv:
Error in complete.cases(object) : negative length vectors are not allowed
Here's an example:
model.calibrate <-
gam(meansalesw ~ s(tscore,bs="cs",k=4),
data=toplot,
weights=weight,
gam.method="perf.magic")
> test <- predict(model.calibrate,newdata)
Error in
2007 Dec 26
1
Cubic splines in package "mgcv"
R-users
E-mail: r-help@r-project.org
My understanding is that package "mgcv" is based on
"Generalized Additive Models: An Introduction with R (by Simon N. Wood)".
On the page 126 of this book, eq(3.4) looks a quartic equation with respect
to
"x", not a cubic equation. I am wondering if all routines which uses
cubic splines in mgcv are based on this quartic
2012 Aug 14
1
Random effects in gam (mgcv 1.7-19)
Hi,
I am using the gam function in the mgcv package, I have random effects in
my model (bs="re") this has worked fine, but after I updated the mgcv
package to version 1.7-19 I recive an error message when I run the model.
>
fit1<-gam(IV~s(RUTE,bs="re")+s(T13)+s(H40)+factor(AAR)+s(V3)+s(G1)+s(H1)+s(V1)+factor(LEDD),data=data5,method="ML")
> summary.gam(fit1)
2011 Nov 09
2
Problem with simple random slope in gam and bam (mgcv package)
Dear useRs,
This is the first time I post to this list and I would appreciate any
help available. I've used the excellent mgcv package for a while now
to investigate geographical patterns of language variation, and it has
has always worked without any problems for me. The problem below
occurs using R 2.14.0 (both 32 and 64 bit versions in Windows and the
64 bit version in Unix) and mgcv (both
2010 May 18
2
Fatal error that doesn't let me start R
Hi, all.
I have R installed in my computer. I guess I did something in my previous
session, and now every time I start R, I find the following message:
"Fatal error: unable to restore saved data in .RData"
I uninstalled R and installed it again and I'm still getting this message.
Can anyone help me?
Gilbert
2012 Jul 23
1
mgcv: Extract random effects from gam model
Hi everyone,
I can't figure out how to extract by-factor random effect adjustments from a
gam model (mgcv package).
Example (from ?gam.vcomp):
library(mgcv)
set.seed(3)
dat <- gamSim(1,n=400,dist="normal",scale=2)
a <- factor(sample(1:10,400,replace=TRUE))
b <- factor(sample(1:7,400,replace=TRUE))
Xa <- model.matrix(~a-1) ## random main effects
Xb <-
2010 Jun 18
2
varIdent error using gam function in mgcv
Hello,
As I am relatively new to the R environment this question may be either
a) Really simple to answer
b) Or I am overlooking something relatively simple.
I am trying to add a VarIdent structure to my gam model which is fitting
smoothing functions to the time variables year and month for a particular
species. When I try to add the varIdent weights to variable Month I get this
error returned.
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
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 Jun 06
1
gamm error message
Hello,
Why would I get an error message with the following code for gamm? I
want to fit the a gam with different variances per stratum.
library(mgcv)
library(nlme)
Y<-rnorm(100)
X<-rnorm(100,sd=2)
Z<-rep(c(T,F),each=50)
test<-gamm(Y~s(X),weights=varIdent(form=~1|Z))
summary(test$lme) #ok
summary(test$gam)
Gives an error message:
Error in inherits(x, "data.frame")
2009 Sep 14
1
How to extract partial predictions, package mgcv
Dear package mgcv users,
I am using package mgcv to describe presence of a migratory bird species as
a function of several variables, including year, day number (i.e.
day-of-the-year), duration of survey, latitude and longitude. Thus, the
"global model" is:
global_model<-gam(present ~ as.factor(year) + s(dayno, k=5) + s(duration,
k=5) + s(x, k=5) + s(y, k=5), family =
2008 Apr 09
1
mgcv::predict.gam lpmatrix for prediction outside of R
This is in regards to the suggested use of type="lpmatrix" in the
documentation for mgcv::predict.gam. Could one not get the same result more
simply by using type="terms" and interpolating each term directly? What is
the advantage of the lpmatrix approach for prediction outside R? Thanks.
--
View this message in context: