Displaying 20 results from an estimated 1000 matches similar to: "Help with using unpenalised te smooth in negative binomial mgcv gam"
2013 Apr 23
1
GAM Penalised Splines - Intercept
Hey all,
I'm using the gam() function inside the mgcv package to fit a penalised spline to some data. However, I don't quite understand what exactly the intercept it includes by default is / how to interpret it.
Ideally I'd like to understand what the intercept is in terms of the B-Spline and/or truncated power series basis representation.
Thanks!
2001 Jan 15
1
announce: survival5 bug fix
Anyone using the penalised partial likelihood routines in survival5 should
update their version.
A bug has been fixed in the S package: in coxph() models with penalised
likelihood and strata it was possible in some circumstances to get an
infinite loop or perhaps an incorrect answer.
The new version (2.3) is on cran.r-project.org and will percolate through
CRAN in the next few days.
-thomas
2001 Jan 15
1
announce: survival5 bug fix
Anyone using the penalised partial likelihood routines in survival5 should
update their version.
A bug has been fixed in the S package: in coxph() models with penalised
likelihood and strata it was possible in some circumstances to get an
infinite loop or perhaps an incorrect answer.
The new version (2.3) is on cran.r-project.org and will percolate through
CRAN in the next few days.
-thomas
2010 Oct 27
1
GAM function in mgcv package
Hi R-users
I am trying to use the GAM function of the mgcv package. But I am having
problem trying to specify the k parameter.
Although I managed to run some models by giving to the parameter some
(random) value, and it is explained by Wood (2006) that it does not seem
to "really" affect the final result, I would like to grasp better its
meaning.
I understand that is the
2012 Sep 25
1
REML - quasipoisson
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.
However, when phi differs from 1, I'm stuck.
#simulate some data
library(mgcv)
set.seed(1)
x1<-runif(500)
x2<-rnorm(500)
2003 Nov 22
0
: how to plot smooth function estimate from gam (mgcv package) in other program
Hi all,
I would like to export the smooth function estimate I got from gam to plot
it in another graphics software. In S-plus I use the function preplot() for
that, but it seems not to work in R.
Has somebody an idea how to solve that?
Thanks
Stephanie
********************************
Stephanie von Klot
Institut f?r Epidemiologie
GSF - Forschungszentrum
f?r Umwelt und Gesundheit
Ingolst?dter
2013 Mar 21
1
[mgcv][gam] Odd error: Error in PredictMat(object$smooth[[k]], data) : , `by' variable must be same dimension as smooth arguments
Dear List,
I'm getting an error in mgcv, and I can't figure out where it comes
from. The setup is the following: I've got a fitted GAM object called
"MI", and a vector of "prediction data" (with default values for
predictors). I feed this into predict.gam(object, newdata = whatever)
via the following function:
makepred = function(varstochange,val){
for
2013 Jan 10
0
mgcv: Plotting probabilities for binomial GAM with crossed random intercepts and factor by variable
mgcv: Constructing probabilities for binomial GAM with crossed random
intercepts and factor by variable
Hello,
(I'm sorry if this has been discussed elsewhere; I may not have been
looking in the right places.)
I ran a binomial GAM in which "Correct" is modelled in terms of the
participant's age and the modality in which the stimulus is presented
(written vs spoken).
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 <-
2005 Nov 23
1
1st derivative {mgcv} gam smooth
Dear R-hep,
I'm trying to get the first derivative of a smooth from a gam
model like:
model<-gam(y~s(x,bs="cr", k=5)+z) and need the derivative: ds(x)/dx. Since
coef(model) give me all the parameters, including the parameters of the
basis, I just need the 1st derivative of the basis s(x).1, s(x).2, s(x).3,
s(x).4. If the basis were generated with the function
2009 Jan 13
1
Message: No title available (pre-2.0.0 install?)
Hello All,
I'm actually the system administrator of a UNIX system where several
users use R version 2.6.0. I have a user who is trying to use the SURVEY
package, and when he does, he gets the message:
survey' is not a valid package -- installed < 2.0.0?
When I run the library() command, I get (see below):
Anything that is listed as ** No title available (pre-2.0.0 install?) **
2008 May 15
5
Inconsistent linear model calculations
Readers,
Using version 251 I tried the following command:
lm(y~a+b,data=datafile)
Resulting in, inter alia:
...
coefficients
(intercept) a
1.2 3.4
Packages installed:
acepack ace() and avas() for selecting regression
transformations
adlift An adaptive lifting scheme algorithm
akima Interpolation of irregularly spaced
2016 Apr 26
0
Penalised spline regression
Good Afternoon Everyone,
I am looking for advice fitting a linear mixed model where the random components do not seem to fit within the model formulae for lmer. The columns of Z are not stratified and have the notional random formula (z1 | 1) + ... + (zk | 1).
Context
I am fitting a penalised thin plate spline with knots k1 to kn. The basis functions Zk are |x-ki|^3 and the penalty matrix has
2005 Aug 24
1
lm.ridge
Hello, I have posted this mail a few days ago but I did it wrong, I hope
is right now:
I have the following doubts related with lm.ridge, from MASS package. To
show the problem using the Longley example, I have the following doubts:
First: I think coefficients from lm(Employed~.,data=longley) should be
equal coefficients from lm.ridge(Employed~.,data=longley, lambda=0) why
it does not happen?
2012 Mar 23
2
Help with R package forecast
When I type library() to see what is installed the following list in RED
comes up.
Packages in library '/home/jason/R/i686-pc-linux-gnu-library/2.13':
abind Combine multi-dimensional arrays
aplpack Another Plot PACKage: stem.leaf, bagplot,
faces, spin3R, and some slider functions
biglm bounded memory linear and
2005 Apr 13
0
GAMM in mgcv - significance of smooth terms
In the summary of the gam object produced by gamm, the "Approximate
significance of smooth terms" appears to be a test of the improvement in fit
over a linear model, rather than a test of the significance of the overall
effect of x on y:
test.gamm<-gamm(y~te(x, bs="cr"), random=list(grp=~1))
summary(test.gamm$gam)
.
.
.
Approximate significance of smooth terms:
2000 May 04
0
About Omega in pda()
** High Priority **
Hello R users
My issue is both theorical and technical.
I would like to run a penalised discriminant analysis with the fda() function, but I don''t know all the details of splines theory.
I try on the example of the phonems from the article "Penalised Discriminant Analysis" of Hastie, Buja and Tibshirani 1994 : 5 groups and 256 variables.
The 256
1999 Apr 21
0
survival5
A nearly complete port of the new survival5 package has been sent to CRAN
and will soon be appearing on a mirror near you in the contrib/devel
area.
This new package, the successor to survival4, has a more stable likelihood
maximiser for parametric survival models and incorporates penalised
likelihoods for adding smoothing splines, ridge regression, and
(approximately) frailties to survival
2013 Jul 19
0
mgcv: Impose monotonicity constraint on single or more smooth terms
Dear R help list,
This is a long post so apologies in advance. I am estimating a model with the mgcv package, which has several covariates both linear and smooth terms. For 1 or 2 of these smooth terms, I "know" that the truth is monotonic and downward sloping. I am aware that a new package "scam" exists for this kind of thing, but I am in the unfortunate situation that I am
2003 May 07
0
frailty models in survreg() -- survival package (PR#2933)
I am confused on how the log-likelihood is calculated in a parametric
survival problem with frailty. I see a contradiction in the frailty() help
file vs. the source code of frailty.gamma(), frailty.gaussian() and
frailty.t().
The function frailty.gaussian() appears to calculate the penalty as the
negative log-density of independent Gaussian variables, as one would
expect:
>