Simon
I wonder whether I can take advantage of this thread and ask you another
related question. Now, I want to get the 95%CI of the fit and their
derivatives as well. For the original fitted curves, It is straightforward
as the option "type=terms" can be used to get the CI for the fixed effect.
N
Hi, Simon
Thank you for your explanation! I followed the instructions and
successfully get the predicted values with both fixed and random effects
incorporated: pred.new=predict.gam(gamm1$gam,newdata,type="response").
Also, what I meant to say was "plot(gamm1$gam, pages=1)" for left and right
fig
>
> gamObj=gam(brainVolume~ s(correctedAge) + s(subjIndexF, bs="re") +
> s(subjIndexF, correctedAge, bs="re"), method="REML", data=mydata),
> where subjIndexF is a factor for each subject. I was thrown an error
> saying "more coefficients than data".
>
--- I'm not sure exactly how many scans a
If 'subjIndexF' is a factor for subject, then s(subjIndexF, bs="re")
will produce a random effect for subject. i.e. each subject will be
given its own random intercept term, which is a way that repeated
measures data like this are often handled.
The reason for the s(subjIndexF, bs="re") syntax
> On Mar 30, 2017, at 6:56 AM, Leon Lee wrote:
>
> David
>
> Thank you for your reply. I apologize if I posted in the wrong forum, as I
> really couldn't decide which forum is the best place for my question and I
> saw similar questions asked before in this forum.
>
> I agree that a sample
David
Thank you for your reply. I apologize if I posted in the wrong forum, as I
really couldn't decide which forum is the best place for my question and I
saw similar questions asked before in this forum.
I agree that a sample of ~30 subjects (70 scans in total), the model can be
too complicated
> On Mar 28, 2017, at 9:32 AM, Leon Lee wrote:
>
> Hi, R experts
>
> I am new to R & GAM toolbox and would like to get inputs from you all on my
> models. The question I have is as follows:
> I have 30 subjects with each subject being scanned from one to three times
> in the first year of life.
7 matches
Mail list logo