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

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

[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

Re: [R] itsadug:: plot_smooth and plot_diff

2016-06-13 Thread Fotis Fotiadis
ackexchange.com or consult > a local statistician. > > Cheers, > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County"

[R] itsadug:: plot_smooth and plot_diff

2016-06-12 Thread Fotis Fotiadis
Hi all I am using bam to analyse the data from my experiment. It's a learning experiment, "acc" denotes accuracy and "cnd" denotes a within-subjects variable (with two levels, "label" and "ideo")."Ctrial" is centered trial (ranging from 1 to 288). The model is: bam(acc~ 1 + cnd + s(ctrial) +

Re: [R] mgcv::gam(): NA parametric coefficient in a model with two categorical variables + model interpretation

2016-05-24 Thread Fotis Fotiadis
gc then you need to set igc to be an ordered factor, and > use something like... > ~ igc + s(ctrial) + s(ctrial,by=igc) > - see section on `by' variables in ?gam.models. > > best, > Simon > > > On 22/05/16 23:29, Fotis Fotiadis wrote: > >> Hallo all >> >>

[R] mgcv::gam(): NA parametric coefficient in a model with two categorical variables + model interpretation

2016-05-22 Thread Fotis Fotiadis
Hallo all I am using a gam model for my data. m2.4<-bam(acc~ 1 + igc + s(ctrial, by=igc) + shape + s(ctrial, by=shape) + s(ctrial, sbj, bs = "fs", m = 1) , data=data, family=binomial) igc codes condition and there are four levels (CAT.pseudo, CAT.ideo,PA.pseudo, PA.ideo), and shape is a factor

Re: [R] gam.check() NA results (k-index, p-value) of a gam logistic regression model

2016-05-18 Thread Fotis Fotiadis
colour coded by level of igc, just > to check that there doesn't seem to be missed pattern in them. However with > binary residuals you are unlikely to see much. > > best, > Simon > > > On 17/05/16 20:39, Fotis Fotiadis wrote: > >> Hello all >> >> I am usin

[R] gam.check() NA results (k-index, p-value) of a gam logistic regression model

2016-05-17 Thread Fotis Fotiadis
Hello all I am using bam for a mixec-effects logistic regression model: b0<-bam(acc~ 1 + igc + s(ctrial, by=igc) + s(sbj, bs="re") + s(ctrial, sbj, bs="re") , data=data, family=binomial) >summary(b0) Family: binomial Link function: logit Formula: acc ~ 1 + igc + s(ctrial, by = igc) + s(sbj,

Re: [R] lineplot.CI {sciplot}: continuous line

2010-10-27 Thread Fotis Fotiadis
: Fotis Fotiadis fotisfotia...@yahoo.gr Κοιν.: r-help@r-project.org Ημερομηνία: Τετάρτη, 27 Οκτώβριος 2010, 20:38 It could be more elegant, but I think this does what you want. ... lineplot.CI(blck, perf, group = cnd, xlab=Block, ylab=% Optimal Responses, cex.leg=1.2, x.leg = 18, y.leg=0.4