Dear Professor Wood,

Thank you for taking the time to fix the problem.

Best,
Fotis



On Thu, Sep 22, 2016 at 4:25 PM, Simon Wood <simon.w...@bath.edu> wrote:

> Hi Fotis,
>
> Thanks for the report, and sending me the data and code (off list). The
> problem is triggered by 'ctrial' being a (one column) matrix. An immediate
> fix is
>
> data_a$ctrial <- as.numeric(data_a$ctrial)
>
> - mgcv 1.8-16 will catch the problem automatically internally.
>
> best,
> Simon
>
> On 20/09/16 17:22, Fotis Fotiadis wrote:
>
>> Hi all
>>
>> I am using the bam function of the mgcv package to model behavioral data
>> of
>> a learning experiment. To model individual variation in learning rate, I
>> am
>> testing models with (a) by-participant random intercepts of trial, (b)
>> by-participant random slopes and random intercepts of trial, and (c)
>> by-participant random smooth terms.
>>
>> While all (a) and (c) models converge, I am getting an error for every
>> possible variation of a model with random intercepts and random slopes.
>> For
>> example:
>>
>> m1.rs<-bam(acc~ 1 + igc + s(ctrial) + s(sbj, bs="re") + 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 Wood, School of Mathematics, University of Bristol BS8 1TW UK
> +44 (0)117 33 18273     http://www.maths.bris.ac.uk/~sw15190
>
>


-- 
PhD Candidate
Department of Philosophy and History of Science
University of Athens, Greece.
http://users.uoa.gr/~aprotopapas/LLL/en/members.html#fotisfotiadis

Notice: Please do not use this account for social networks invitations, for
sending chain-mails to me, or as it were a facebook account. Thank you for
respecting my privacy.

        [[alternative HTML version 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.

Reply via email to