Displaying 20 results from an estimated 6000 matches similar to: "naresid.exclude query"
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
mgcv 1.4 is now on CRAN. It includes new features to allow mgcv::gam to fit
almost any (quadratically) penalized GLM, plus some extra smoother classes.
New gam features
-------------------------
* Linear functionals of smooths can be included in the gam linear predictor,
allowing, e.g., functional generalized linear models/signal regression,
smooths of interval data, etc.
* The parametric
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
mgcv 1.4 is now on CRAN. It includes new features to allow mgcv::gam to fit
almost any (quadratically) penalized GLM, plus some extra smoother classes.
New gam features
-------------------------
* Linear functionals of smooths can be included in the gam linear predictor,
allowing, e.g., functional generalized linear models/signal regression,
smooths of interval data, etc.
* The parametric
2006 Apr 11
1
gaussian family change suggestion
Hi,
Currently the `gaussian' family's initialization code signals an error if
any response data are zero or negative and a log link is used. Given that
zero or negative response data are perfectly legitimate under the GLM
fitted using `gaussian("log")', this seems a bit unsatisfactory. Might
it be worth changing it?
The current offending code from `gaussian' is:
2009 Mar 25
1
get_all_vars fails with matrices (PR#13624)
Hi,
According to the help file for model.frame/get_all_vars, the following should
produce the same output from both functions, but it doesn't...
> dat <- list(X=matrix(1:15,5,3),z=26:30)
> model.frame(~z+X,dat)
z X.1 X.2 X.3
1 26 1 6 11
2 27 2 7 12
3 28 3 8 13
4 29 4 9 14
5 30 5 10 15
> get_all_vars(~z+X,dat)
[1] z X <NA> <NA>
<0
2009 Mar 04
0
mgcv 1.5-0
mgcv 1.5-0 is now on CRAN. Main changes are:
* REML and ML smoothness selection are now available.
* A Tweedie family has been added.
* `gam.method' has been replaced (see arguments `method' and `optimizer'
for `gam')
For other changes see the changeLog.
Simon
--
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603
2009 Mar 04
0
mgcv 1.5-0
mgcv 1.5-0 is now on CRAN. Main changes are:
* REML and ML smoothness selection are now available.
* A Tweedie family has been added.
* `gam.method' has been replaced (see arguments `method' and `optimizer'
for `gam')
For other changes see the changeLog.
Simon
--
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603
2011 Jun 09
0
Fwd: Re: residual checking for GAM (mgcv)
The plots look reasonable to me. The plot of residuals against linear
predictor always looks scary when many of the fitted values are very
close to zero, so I tend to look at residuals against sqrt(fitted) in
such cases. I don't think that the presence of the zero curve is a
reason to reject the model --- it's easy to produce such plots by
fitting a completely correct model to simulated
2012 Oct 01
0
[Fwd: REML - quasipoisson]
Hi Greg,
For quasi families I've used extended quasi-likelihood (see Mccullagh
and Nelder, Generalized 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
2011 Aug 16
0
Cubic splines in package "mgcv"
re: Cubic splines in package "mgcv"
I don't have access to Gu (2002) but clearly the function R(x,z) defined
on p126 of Simon Wood's book is piecewise quartic, not piecewise cubic.
Like Kunio Takezawa (below) I was puzzled by the word "cubic" on p126.
As Simon Wood writes, this basis is not actually used by mgcv when
specifying bs="cr".
Maybe the point is
2002 May 20
1
suggestion for example for base:naresid
Dear list:
since it took me a little while to figure out how to make use of naresid, I thought that
the below R code might be useful as an example on the help page.
Regards,
Markus
# generate some data
x1 <- runif(20)
y <- 10 + 5*x1 + rnorm(20)
summary(lm.0 <- lm(y ~ x1))
# append some NA's to y
y <- c(y, rep(NA, 5))
# generate some further x1s
x1 <- c(x1, runif(5))
#
2001 Aug 29
1
suggestion for example for base:naresid
Dear list:
since it took me a little while to figure out how to make use of naresid, I thought that
the below R code might be useful as an example on the help page.
Regards,
Markus
# generate some data
x1 <- runif(20)
y <- 10 + 5*x1 + rnorm(20)
summary(lm.0 <- lm(y ~ x1))
# append some NA's to y
y <- c(y, rep(NA, 5))
# generate some further x1s
x1 <- c(x1, runif(5))
#
2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users,
I am trying to show the equation (including coefficients from the model
estimates) for a gam model but do not understand how to.
Slide 7 from one of the authors presentations (gam-theory.pdf URL:
http://people.bath.ac.uk/sw283/mgcv/) shows a general equation
log{E(yi )} = ?+ ?xi + f (zi ) .
What I would like to do is put my model coefficients and present the
equation used. I am an
2003 Apr 26
1
predict/residual
I am having trouble understanding the way naresid is used when using
predict/residual in a new data frame.
>From the example below, the NAs are displayed when predicting inside the
original frame, but are dropped when applied to a new frame.
ultimately I need to cbind the residuals and predictions to a dataframe.
Any help would be appreciated. Thanks in advance.
>
2001 Apr 23
4
Time series in R
The help pages of R-1.2.2 include several pages on various
time series functions, but when I try to use these functions
they appear not to be available .... am I missing something
obvious, or are these functions not yet built?
Chris Rogers
-----------------------------------------------------------------------
L C G Rogers, Professor of Probability tel:+44 1225 826224
Department of
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
2011 May 17
1
adding up elements within a list
Dear R users
I have a list, as follows:
> intvl.period.myrs
$Devonian
[1] 4.8 4.2 9.5 5.7
$Ordovician
[1] 7.2 5.1 10.2 1.9
$Silurian
[1] 4.7 3.0 7.8 2.0 3.3 1.6 2.6 2.7
I want to write a loop that will sum up the values in each part, and give me a
vector containing the (in this case 3) summed values
this is what I have so far:
for (i in 1:length(names(intvl.periods.myrs)) {
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
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
2008 Nov 14
2
GAM and Poisson distribution
Hi -I'm running a GAM with 7 explanatory variables with a Poisson error
structure. All of the variables are continuous so I'm getting error
messages in R.
cod.fall.full.gam.model<-gam(Kept.CPUE~s(HOUR)+s(LAT_dec)+s(LONG_dec)+s(meantemp_C)+s(meandepth_fa)+s(change_depth)+s(seds),
data=cod.fall.version2,family=poisson)
In dpois(y, mu, log = TRUE) ... : non-integer x = 5.325517
2009 Nov 22
1
GAM plots
Hello all...
I'm attempting to write my own GAM plot function, so I can overlay it
on top of an already existing plot.
Problem is that after I do the gam, e.g. m<-gam(...), I cannot match
the graph that gam.plot outputs when I attempt to plot the values
from m$residuals, m$linear.predictors or m$fitted.values. Kind of at a
loss what variables to use or if I need to do something