search for: beta_13

Displaying 1 result from an estimated 1 matches for "beta_13".

Did you mean: beta13
2010 Jul 21
0
Piecewise regression using lme()
...rnorm(30,0,5) segment3=-40+0.5*1:15+rnorm(15,0,1) group=c(rep(1,20),rep(2,30),rep(3,15)) y=c(segment1,segment2,segment3) Data=data.frame(y,t=1:65,group=as.factor(group)) the model I'd like to fit is: y_t= (beta_01+beta_11*t+error_1)*(group==1)+(beta_02+beta_12*t+error_2)*(group==2)+(beta_03+beta_13*t+error_3)*(group==3) It looks like a mixed effects model were the fixed effect are the piecewise linear regression parts (beta_0i+beta_1i*t) and the random effects are the variance components error_i. The problem is that I can't find the way the write this model correctly using the lme() fu...