, reproducible code.
--
Simon Wood, School of Mathematics, University of Edinburgh,
https://www.maths.ed.ac.uk/~swood34/
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
On 21/07/2022 15:19, jade.shodan--- via R-help wrote:
Hello everyone (incl. Simon Wood?),
I'm not sure that my original question (see below, including
reproducible example) was as clear as it could have been. To clarify,
what I would to like to get is:
1) a perspective plot of temperature x
nZU.png
Data can be found on my [GitHub][6] site in the file
[data_cross_validated_post2.rds][7]. A csv version is also available.
This is my code:
```r
library(readr)
library(mgcv)
df <- read_rds("data_crossvalidated_post2.rds")
# Create matrices for lagged weather variables
nimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Edinburgh,
https://www.maths.ed.ac.uk/~swood34/
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-he
e message
Error in initial.sp(w * x, S, off) : S[[1]] matrix is not +ve definite.
After reading everything I could find on mrf, it sounds like there was a bug that was brought up with Simon Wood in 2012, due to differences between windows and linux, with the linus machine stop
n p-values for smooth components of an extended generalized
additive model. Biometrika 2013;100(1):221-228
or thereafter, but I am not a statistician. I could use help understanding
what the reference degrees of freedom are.
Thank you,
Susan
--
Simon Wood, School of Mathematics, University
s to where the problem may occur? Is it something within the C-code
> used within the package (as the last error seems to indicate), or is it
> related to the computer cluster?
>
> Any help or insights is much appreciated.
>
> Kind regards,
>
> Frank
>
> [[alternative HTML version deleted]]
>
>
>
I would quote the p-value, but not the statistic (as it is not a
standard F stat). The actual statistic is given here:
https://academic.oup.com/biomet/article-pdf/100/4/1005/566200/ast038.pdf
On 14/12/2018 04:33, Smith, Desmond wrote:
Dear All,
I have a mgcv::gam model of the form:
m1 <-
This first derivative penalty spline will do it, but the price paid is
that the curves are often quite wiggly.
library(mgcv); set.seed(5)
x <- runif(100); y <- x^4 + rnorm(100)*.1
b <- gam(y~s(x,m=1))
pd <- data.frame(x=seq(-.5,1.5,length=200))
ff <- predict(b,pd,se=TRUE)
Dear Øystein,
In your code 'id' is set up to be numeric. In your first gamm call it
gets coerced to a factor (since nothing else would make sense). In your
second gamm call it is simply treated as numeric, since that could makes
sense. To make the two models equivalent you just need to
-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University
ct.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
__
R-help@r-project.org mailin
sing predict(gamm1$gam,...,
type="terms") supplying the factor levels and correctedAges at which you
want to evaluate the curves.
> Many thanks!
> L
>
>
>
> On Thu, Apr 6, 2017 at 8:22 AM, Simon Wood <simon.w...@bath.edu
> <mailto:simon.w...@bath.edu
commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE a
rsion deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon
quot;Note that smooth ids are not supported for random effect terms. Unlike most smooth
terms, side conditions are never applied to random effect terms in the event of nesting
(since they are identifiable without side conditions)."
When I do a search on "using gam mgcv formula mixed effects&qu
ailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University o
r-help>
> stat.ethz.ch
> The main R mailing list, for announcements about the development of R and the
> availability of new code, questions and answers about problems and solutions
> using R ...
>
>
>
>>> PLEASE do read the posting guide http://www.R-proje
+ s(ctrial, sbj,
bs="re") , data=data_a, family=binomial)
Error in G$smooth[[i]]$first.para:G$smooth[[i]]$last.para :
argument of length 0
Any idea on what that error might be?
Thank you in advance for your time.
Fotis
P.S.: R version: 3.3.1, mgcv version: 1.8.15
--
Simon W
rial, sbj,
bs="re") , data=data_a, family=binomial)
Error in G$smooth[[i]]$first.para:G$smooth[[i]]$last.para :
argument of length 0
Any idea on what that error might be?
Thank you in advance for your time.
Fotis
P.S.: R version: 3.3.1, mgcv version: 1.8.15
--
Simon Wood
e for (A)?
Is it the reference level? Or is it, perhaps, the "grand mean" of the shape
variable?
Thank you in advance for your time,
Fotis
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
_
mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~
y=x1)*s(x2,by=x2) since interactions are surely present and
> i'm not sure if a linear combination is enough.
>
> Thanks!
> Dominik
>
>
> On Wed, May 11, 2016 at 3:11 AM, Simon Wood <simon.w...@bath.edu
> <mailto:simon.w...@bath.edu>> wrote:
&g
bly use te(x1,x2) unless x1 and x2 are really on the same
scale, in which case s(x1,x2) might be appropriate. The `by' variable
trick is probably not going to work so well for interactions, however
(it's not so clear what the by variable should be).
--
Simon Wood, School of Mathematics, Univ
nted, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and mo
ing-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
__
R-help@r-project.org maili
. Thank you very much.
Best
Diego
--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https
see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http:
the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2
.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44
Simon Wood s.w...@bath.ac.uk
mailto:s.w...@bath.ac.uk:
Can you give the result of typing
sessionInfo()
in the session where this happens, please?
On 15/10/14 16:48, Rodrigo Tardin wrote:
Hi all,
I am not sure if this is the right place for this question
LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] mgcv_1.7-26 nlme_3.1-111
loaded via a namespace (and not attached):
[1] grid_3.0.2 lattice_0.20-23 Matrix_1.1-4
1
On 08/21/2014 04:29 PM, Simon Wood
oops, I just realised that the fix referred to below is in mgcv 1.8-3 -
not yet on CRAN.
On 25/08/14 13:20, Simon Wood wrote:
Hi Andrew,
In some of the shots you sent then top was reporting several cores
working. I think the problem here may be to do with the way bam is
parallelized
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
but then the model saying it was not converged and
vice versa. The QP seemed to fit the data well (and quickly) so we
switched to that.
Thanks again.
Trevor
On Wed, Jul 16, 2014 at 12:44 PM, Simon Wood s.w...@bath.ac.uk
mailto:s.w...@bath.ac.uk wrote:
Trevor,
It looks like you've added a parametric
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603
://is.na(x)])
#Fit MRF gam
mdl - gam(z ~ s(xy.idx,bs=mrf,xt=list(nb=nb.l)),data=obs,method=REML)
On 8 May 2014 15:15, Simon Wood s.w...@bath.ac.uk
mailto:s.w...@bath.ac.uk wrote:
Hi Mark,
I'm not sure what is happening here - there is no chance that nb.l
contains
I'm looking for well-commented versions of various functions comprising
mgcv,
Commented versions are available e.g. in mgcv_*.*-**.tar.gz from CRAN
(unzip and look in mgcv/R). Well commented versions is another matter...
best,
Simon
--
Simon Wood, Mathematical Science, University of Bath BA2
-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org
.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
as a mixed model
as Simon Wood neatly explains in his book.
Given the original design matrix W and penalisation matrix S, I would
like to find the fixed (X) and random (Z) design matrices for the mixed
model parameteristaion. X are the columns of W for which S has zero
eigenvalues and Z is the random
)
mean(dev2c)
sd(dev2c)
#dev much lower than expected
m1q-gam(y~s(x1),family=quasipoisson,scale=-1)
m1q$scale
m1q$sig2
m1q$dev/(1000-sum(m1q$edf))
#scale estimate 1
sum((y-fitted(m1q))^2/fitted(m1q))/(1000-sum(m1q$edf))
#Pearson estimate of scale ok
--
Simon Wood, Mathematical Science
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
that might work. It is, of
course, possible to just do this:
xylemRohWeekXnnSite.fit - predict.gam(xylemRohWeekXnn.fit.bam,
type=response, se=F)
That gives predictions for the original dataset.
But I think the error might be helpful in alerting one to the
problems with the model.
--
Simon
-28nlme_3.1-113 RCurl_1.95-4.1 bitops_1.0-6
loaded via a namespace (and not attached):
[1] grid_3.0.2 lattice_0.20-24 Matrix_1.1-2tools_3.0.2
/snap
On 31/01/14 12:57, Simon Wood wrote:
Hi Katharina,
Could you try upgrading to mgcv_1.7-28, please? There was an occasional
problem
.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
]]
__ R-help@r-project.org
mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science
be taken as the p-value
associated with the random effect?
Thanks.
Will Shadish
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
Hi Alice,
This is a bug in gam.side, which was assuming that any interaction
smooth that needed identifiability constraints would be penalized.
thanks for reporting it - fixed for next version.
In the meantime have you considered using `ti' terms instead of `te'?
These provide a more
I can't see anything immediately wrong except:
1. presumably there are repeated values in 'road_quiet' aren't there? If
so then your inequality constraint matrix
will contain constraints that are *exact* copies of each other. I'm not
sure, and don't immediately have time to try it
out, but it
Probably you didn't want to set x0=0:1? Here is some code, to do what you want.
(The CI shape is not identical to the plot(b) version as the uncertainty
includes
the uncertainty in the other smooths and the intercept now.)
library(mgcv)
set.seed(2)
dat - gamSim(1,n=400,dist=normal,scale=2)
b -
I think it's going to be a problem to have different sized groups in
your second model. ?corSymm says that a general correlation matrix is
being estimated (i.e. the correlation between each pair of observations
is being estimated - for this to be meaningful across groups you need
the jth
]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University
.
2) what is testStat?
mgcv:::testStat
- probably worth looking at the original source code which includes some
comments. It does the actual computation.
best,
Simon
thanks
Greg
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood
I would be very nervous about relying on an anova call here. It will
attempt a generalized likelihood ratio test, but gamm is using penalized
quasi likelihood and there is really no likelihood here (even without
the problem that if there was a likelihood the null hypothesis would
still be on
of freedom will vary across
models, depending on the imputed data? Has anybody thought about this,
or do I have have some serious pencil-and-paper ahead of me?
Thanks,
Andrew
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http
, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
=1.6,link=log),data=df,method=REML)
gives a model that is closer to being reasonable (p-values are then
consistent between select=TRUE and FALSE).
best,
Simon
On 18/04/13 14:24, Simon Wood wrote:
Jan,
Thanks for this. Is there any chance that you could send me the data off
list and I'll try
]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical
the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r
-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https
Andrew,
I think that the weird edfs may result from an unhandled case in the
side constraint calculation. In particular the term
s(BCAR.imp,bs=cr,k=length(BCAR.knots),by=as.factor(pot.trial))
is confounded with
te(soc.imp,BCAR.imp,k=c(4,4))
but there was an issue with picking this up
), error=function(e) e, finally=doyee)
if(inherits(r.ints, error)) {r.ints=doyee; print(an error happened
but it got handled.)}
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
)
fit = gam(y~s(x)+s(z)+other)
plot(fit,all.terms=TRUE)
plot(fit,select=3,xlab=???)
dev.copy2pdf(file = This.pdf.needs.proper.labels.pdf, height = 8,
width = 8)
Any ideas for workarounds?
Many thanks as always,
Andrew
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44
mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603
guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
(dumb.example2,ylim=c(-500,200))
The confidence bands expand but the location of the fit doesn't change!
What part of the gamObject controls the plot of the smooth?
On 12/02/2012 02:15 AM, Simon Wood wrote:
Hi Andrew,
mgcv matches the knots to the smooth arguments by name. If an element
of 'knots
Hi Andrew,
mgcv matches the knots to the smooth arguments by name. If an element of
'knots' has
no name it will be ignored. The following will do what you want...
dumb.example = gam(y~s(x,k=3),knots=list(x=dumb.knots))
best,
Simon
On 29/11/12 23:44, Andrew Crane-Droesch wrote:
Dear List,
Hi Silje,
Thanks for this. I guess RUTE is a numeric variable in this model and
hence only has one associated random coefficient? This then causes a
problem when calling predict.gam as part of processing 'residuals=T'.
I've fixed the problem for the next release, but did you really want a
/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing
commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
On 16/10/12 07:32, Andrew Crane-Droesch wrote:
Hi All,
I'm running into a problem with GAM (in the MGCV package). When I try
to estimate the model, I get the following error message:
1 fit -
gam(ndvi~s(rain)+s(temp)+s(rainl1)+s(rainl2)+s(rainxY)+s(rainl1xY)+s(rainl2xY)+s(tempxY),
Hi Andrew,
Could you send me a bit more information (off list, as this is likely to
get into obscure details), please?
In particular can you let me know the mgcv and R version numbers, the
server operating system and, if possible, what BLAS it has installed?
best,
Simon
On 16/10/12 07:32,
incorrect syntaxis. I don't know what the problem is. Any ideas will be
helpful.
Sergio
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch
of phi which makes this work?
f-function(t) (Dpq/(2*t) + F3q + Mp/2*log(2*pi*t) - m3$gcv)^2
optimise(f,interval=c(0.5,1.5))$min-phix
Dpq/(2*phix) + F3q + Mp/2*log(2*pi*phix)
m3$gcv
#but what is phix - not the Pearson estimate or the scale returned by gam?
thanks
Greg Dropkin
--
Simon Wood
Well it's not pretty, but I guess you could try something like this...
best,
simon
library(mgcv)
dat - gamSim(1,n=200,dist=normal,scale=2)
b - gam(y ~ s(x1)+s(x2),data=dat)
m - 40
x1 - seq(0,1,length=m)
x2 - seq(0,1,length=m)
pd - expand.grid(x1=x1,x2=x2)
fv - predict(b,newdata=pd,se=TRUE)
'gam' doesn't know what to do with the model formula '1 ~ 1' (i.e. one
tilde one). What is it supposed to mean? 'glm' also does nothing
meaningful in this case...
## code to load you data file into 'dat' omitted
model-glm(1~1, data=dat)
model
Call: glm(formula = 1 ~ 1, data = dat)
, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
__
R-help@r-project.org mailing list
https
:
Simon, could you clarify this paragraph. We are submitting to a psychology
journal and I am certain they will be asking us about why it is still ok to
use AIC for non-nested models. Thanks. Will Shadish
On 8/2/2012 9:49 AM, Simon Wood wrote:
For AIC model comparison, the usual advice applies
Jan,
Could you send the exact gam call and exact vis.gam call that did this
please? Also, if 'm' denotes your fitted model, what result does
'fitted(m)' give? and what is the output from print(m)?
best,
Simon
On 07/30/2012 09:19 PM, janvanhove wrote:
Hi everyone,
I ran a binomial GAM
.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Simon Wood, Mathematical Science, University of Bath
of the test
statistic...
Thanks for pushing be into action on this!
best,
Simon
On 25/06/12 16:31, Simon Wood wrote:
Martin,
I had a nagging feeling that there must be more to this than my previous
reply suggested, and have been digging a bit further. Basically I would
expect these p-values
1 - 100 of 255 matches
Mail list logo