Displaying 20 results from an estimated 4000 matches similar to: "Fwd: mgcv 1.4 on CRAN"
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 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
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
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:
2011 Jan 14
1
naresid.exclude query
x <- NA
na.act <- na.action(na.exclude(x))
y <- rep(0,0)
naresid(na.act,y)
... currently produces the result...
numeric(0)
... whereas the documentation might lead you to expect
NA
The behaviour is caused by the line
if (length(x) == 0L) return(x)
in `stats:::naresid.exclude'. Removing this line results in the behaviour I'd
expected in the above example (and in a
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
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
2010 Apr 14
1
Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)
Hi,
I am using GAMs (package mgcv) to smooth event rates in a penalized regression setting and I was wondering if/how one can
select the order of the derivative penalty.
For my particular problem the order of the penalty (parameter "m" inside the "s" terms of the formula argument) appears to
have a larger effect on the AIC/deviance of the estimated model than the
2009 Feb 07
1
paraPen in gam [mgcv 1.4-1.1] and centering constraints
Dear Mr. Simon Wood, dear list members,
I am trying to fit a similar model with gam from mgcv compared to what I
did with BayesX, and have discovered the relatively new possibility of
incorporating user-defined matrices for quadratic penalties on
parametric terms using the "paraPen" argument. This was really a very
good idea!
However, I would like to constraint the coefficients
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
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
2013 Mar 11
1
Use pcls in "mgcv" package to achieve constrained cubic spline
Hello everyone,
Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point.
I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can
I achieve this by adapting the following code?
# Penalized example: monotonic penalized regression spline .....
# Generate data from a monotonic truth.
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<--1+x1+0.5*x2+0.3*exp(-2*d)*sin(10*d)*x3
2001 Sep 25
1
rbinding dataframes
I've got a data frame which I've split by a factor,
creating a list of dataframes which I have then done
various operations on individually. I next want to
recombine the resulting dataframes (still held in a list,
still with the same number of columns with the same names)
and there does not appear to be a `good' way to do this -
at the moment, I'm using a for-loop with the rbind
2002 Nov 27
1
R on the Zaurus
Hello All,
I have a working port of R on my SL5500. I've not tested the X windowing
support yet, but was more concerned about the accuracy of the fp emulation.
The following is the result of the test which Stuart Leask recommended I
should try:
Mandrake 8.2
> x<-NA
> is.na(x)
[1] TRUE
> x+1
[1] NA
> 2*x
[1] NA
Zaurus OZ3
> x<-NA
> is.na(x)
[1] TRUE
> x+1
[1] 1
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)) {
2002 Dec 30
1
R on the Zaurus link
Hello All,
The link to the binary & installation instructions (tar.gz binary not an ipk
I'm afraid) is as follows: http://students.bath.ac.uk/enpsgp/Zaurus/#R
It eventually dawned on me that the WORDS_BIGENDIAN define (or lack thereof)
was causing the problems (after testing ieee NaN compliance that is).
When cross-compiling it's probably fair enough that the configure script
2002 Nov 22
1
R on the Zaurus (the return)
Hello All,
I read in the archives that someone managed to compile R but that there were
problems with the fp performance, specifically the handling of NaNs. Could
someone please explain the problem to me and how to test whether it is
occurring.
I have just compiled R for the Zaurus 5500, and want to see whether it works
or requires tweaking.
Regards,
Simon
2012 May 08
2
mgcv: inclusion of random intercept in model - based on p-value of smooth or anova?
Dear useRs,
I am using mgcv version 1.7-16. When I create a model with a few
non-linear terms and a random intercept for (in my case) country using
s(Country,bs="re"), the representative line in my model (i.e.
approximate significance of smooth terms) for the random intercept
reads:
edf Ref.df F p-value
s(Country) 36.127 58.551 0.644