Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x, random = ~ x | trial , data=mydata) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
syntax equation of random intercepts and slopes model
7 messages · Juan Pablo Edwards Molina, Ben Bolker, Wolfgang Viechtbauer
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
That looks about right. You didn't specify the variance of e_ij in your description, and you didn't say explicitly that the u_ and e_ values are Normally distributed ... On Thu, May 17, 2018 at 2:27 PM, Juan Pablo Edwards Molina
<edwardsmolina at gmail.com> wrote:
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Thanks prof. Bolker, Do you mean this? u_i?N(0,?^2) e_ij?N(0,v_i) Juan Juan 2018-05-17 16:57 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
That looks about right. You didn't specify the variance of e_ij in your description, and you didn't say explicitly that the u_ and e_ values are Normally distributed ... On Thu, May 17, 2018 at 2:27 PM, Juan Pablo Edwards Molina <edwardsmolina at gmail.com> wrote:
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
It should be: u_0i ~ N(0, ?^2_0) u_1i ~ N(0, ?^2_1) e_ij ~ N(0, sigma^2) and it is also worth mentioning that the model allows for correlation between u_0i and u_1i. So, technically, the assumption is: [u_0i] ~ MVN([0], [?^2_0 rho*?_0*?_1]) [u_1i] ([0] [ ?^2_1 ]) And if one wants to be really explicit, we assume that u_0i and e_ij are independent and u_1i and e_ij are independent. Best, Wolfgang -----Original Message----- From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Juan Pablo Edwards Molina Sent: Friday, 18 May, 2018 1:34 To: Ben Bolker Cc: R SIG Mixed Models Subject: Re: [R-sig-ME] Fwd: syntax equation of random intercepts and slopes model Thanks prof. Bolker, Do you mean this? u_i?N(0,?^2) e_ij?N(0,v_i) Juan Juan 2018-05-17 16:57 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
That looks about right. You didn't specify the variance of e_ij in your description, and you didn't say explicitly that the u_ and e_ values are Normally distributed ... On Thu, May 17, 2018 at 2:27 PM, Juan Pablo Edwards Molina <edwardsmolina at gmail.com> wrote:
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
Excellent! Is it the case of your example tutorial in http://www.metafor-project.org/doku.php/tips:two_stage_analysis#mixed-effects_model_approach ? Thanks Wolfgang! Juan Edwards Juan 2018-05-18 10:27 GMT-03:00 Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl>:
It should be: u_0i ~ N(0, ?^2_0) u_1i ~ N(0, ?^2_1) e_ij ~ N(0, sigma^2) and it is also worth mentioning that the model allows for correlation between u_0i and u_1i. So, technically, the assumption is: [u_0i] ~ MVN([0], [?^2_0 rho*?_0*?_1]) [u_1i] ([0] [ ?^2_1 ]) And if one wants to be really explicit, we assume that u_0i and e_ij are independent and u_1i and e_ij are independent. Best, Wolfgang -----Original Message----- From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Juan Pablo Edwards Molina Sent: Friday, 18 May, 2018 1:34 To: Ben Bolker Cc: R SIG Mixed Models Subject: Re: [R-sig-ME] Fwd: syntax equation of random intercepts and slopes model Thanks prof. Bolker, Do you mean this? u_i?N(0,?^2) e_ij?N(0,v_i) Juan Juan 2018-05-17 16:57 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
That looks about right. You didn't specify the variance of e_ij in your description, and you didn't say explicitly that the u_ and e_ values are Normally distributed ... On Thu, May 17, 2018 at 2:27 PM, Juan Pablo Edwards Molina <edwardsmolina at gmail.com> wrote:
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina
Yes, that's the same model. Best, Wolfgang -----Original Message----- From: Juan Pablo Edwards Molina [mailto:edwardsmolina at gmail.com] Sent: Friday, 18 May, 2018 15:42 To: Viechtbauer, Wolfgang (SP) Cc: R SIG Mixed Models Subject: Re: [R-sig-ME] Fwd: syntax equation of random intercepts and slopes model Excellent! Is it the case of your example tutorial in http://www.metafor-project.org/doku.php/tips:two_stage_analysis#mixed-effects_model_approach ? Thanks Wolfgang! Juan Edwards Juan 2018-05-18 10:27 GMT-03:00 Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl>:
It should be: u_0i ~ N(0, ?^2_0) u_1i ~ N(0, ?^2_1) e_ij ~ N(0, sigma^2) and it is also worth mentioning that the model allows for correlation between u_0i and u_1i. So, technically, the assumption is: [u_0i] ~ MVN([0], [?^2_0 rho*?_0*?_1]) [u_1i] ([0] [ ?^2_1 ]) And if one wants to be really explicit, we assume that u_0i and e_ij are independent and u_1i and e_ij are independent. Best, Wolfgang -----Original Message----- From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Juan Pablo Edwards Molina Sent: Friday, 18 May, 2018 1:34 To: Ben Bolker Cc: R SIG Mixed Models Subject: Re: [R-sig-ME] Fwd: syntax equation of random intercepts and slopes model Thanks prof. Bolker, Do you mean this? u_i?N(0,?^2) e_ij?N(0,v_i) Juan Juan 2018-05-17 16:57 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
That looks about right. You didn't specify the variance of e_ij in your description, and you didn't say explicitly that the u_ and e_ values are Normally distributed ... On Thu, May 17, 2018 at 2:27 PM, Juan Pablo Edwards Molina <edwardsmolina at gmail.com> wrote:
Sorry, I edited the lmer function... ============================================ Dear list, I fitted a linear mixed effects models to a set of 41 field trials with plot-level assessments of x,y, for estimating the linear regression coefficients ?_0 and ?_1 res1 <- lmer(y ~ x+ (x|trial), data=mydata, REML=F) I wish to write the model equation for its publication, so this is my first try: W_ij= (?_0 + u_0i)+ (?_1+ u_1i) x_ij + e_ij where j subscript represents the j-plot within i-trial, both for y or x. ?0 and ?1 are the population average intercept and slope; u0i and u1i are the effect of the i-trial on the intercept and the slope, respectively, considered as random variables (with mean 0 and variances ?_u0 and ?_u1 a ) I?m not sure if I?m in the right path... I would really appreciate any guidance. Juan Edwards National Institute of Agriculture Technology - Argentina