Re: [R] mgcv: bam(), error in models with random intercepts and random slopes

2016-09-22 Thread Fotis Fotiadis
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 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

Re: [R] mgcv: bam(), error in models with random intercepts and random slopes

2016-09-22 Thread Simon Wood
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

Re: [R] mgcv: bam(), error in models with random intercepts and random slopes

2016-09-21 Thread Simon Wood
Any chance you could send me the data and exact code that produces this (I'll only use the data for investigating this issue of course - often data with the predictor replaced by noise will produce the same error, if sending the raw data is a problem)? best, Simon (mgcv maintainer) On

[R] mgcv: bam(), error in models with random intercepts and random slopes

2016-09-20 Thread Fotis Fotiadis
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