r - Tensor smooths in gamm4 -


i trying extend model similar 1 described gavin simpson here include random effects. https://stats.stackexchange.com/questions/32730/how-to-include-an-interaction-term-in-gam

where locis replaced 4-level factor. fixed effects 2 categorical variables (a , b) , 2 continuous ones (c1 , c2) pairwise interactions. response 1s , 0s.

e.g.

gamm4(y~a*c1 + a*c2 + b*c1 + b*c2                     s(yday, bs = "cc", k = 12) +                  s(yday, bs = "cc", = a, k = 12, m = 1) +                  s(hour, bs = "cc", k = 12) +                  s(hour, bs = "cc", = loc, k = 12, m = 1) +                 t2(hour, yday, = a, bs = rep("cc",2)),                 random = ~ (1 | id),                 family = "binomial"(link="logit"),                 data = dat) 

trying run got error
error in x %*% diag(diagu[indi]) : non-conformable arguments

from lurking around in code of gamm4() , gamm() seems related penalising smooths within each level of random effect?

i running model subset of 4 individuals (can end around 40), , should nest individuals within years.

it problem situation specific (read: being way ambitious on behalf of data), reading gamm4() still "construction phase" on matters makes me wonder if being ambitious on behalf of gamm4()?

or plain wrong , off hiking in dead ends...


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -