Skip to main content
added 470 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22

Assuming the order of or association pattern among repeated measurements are available as a factor or continuous variable time, you will need to decide whether it should be coded as 1–6, 1–24, or some other values where the distance between consecutive trials differ. AR(1) might be a good choice, but other alternative correlation structures require considering. For the trial index time, we need its fixed effect as either a continuous or categorical variable.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package {glmmTMB} for some special error-correlation patterns.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package {glmmTMB} for some special error-correlation patterns.

Assuming the order of or association pattern among repeated measurements are available as a factor or continuous variable time, you will need to decide whether it should be coded as 1–6, 1–24, or some other values where the distance between consecutive trials differ. AR(1) might be a good choice, but other alternative correlation structures require considering. For the trial index time, we need its fixed effect as either a continuous or categorical variable.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package {glmmTMB} for some special error-correlation patterns.

deleted 15 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22

Practically, modeling correlation across trials within the same participant requires prespecified patterns of the residuals. Are the trials done by different surveyors, scales, or equipment, so they can be grouped by Surveyor 1 ... Surveyor n6? Are the trials done sequentially onin a specific order or at different time like Day 1, Day 2, ..., Day 6? Did the trials take place at specific locations that can be geographically grouped into Location A, Location b, ...related by their coordinates? If the study did not record any information regarding how different trials mightshould be associated with each other, a researcher cannot retrieve the residual-correlation pattern by trial even if one suspects any.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package glmmTMB{glmmTMB} for some special error-correlation patterns.

Practically, modeling correlation across trials within the same participant requires prespecified patterns of the residuals. Are the trials done by different surveyors, scales, or equipment, so they can be grouped by Surveyor 1 ... Surveyor n? Are the trials done sequentially on Day 1, Day 2, ..., Day 6? Did the trials take place at specific locations that can be geographically grouped into Location A, Location b, ...? If the study did not record any information regarding how different trials might be associated with each other, a researcher cannot retrieve the residual-correlation pattern by trial even if one suspects any.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package glmmTMB for some special error-correlation patterns.

Practically, modeling correlation across trials within the same participant requires prespecified patterns of the residuals. Are the trials done by different surveyors, scales, or equipment, so they can be grouped by Surveyor 1 ... Surveyor 6? Are the trials done sequentially in a specific order or at different time like Day 1, Day 2, ..., Day 6? Did the trials take place at specific locations that can be geographically related by their coordinates? If the study did not record any information regarding how different trials should be associated with each other, a researcher cannot retrieve the residual-correlation pattern by trial even if one suspects any.

The package {nlme} allows modeling random intercepts and coefficients along with AR process of the residual term, but it may not be necessary or significant for certain data. In the sleepstudy data for example, if the variation by participant is controlled for, the residuals that represent the difference between predicted and observed reaction time may not present enough temporal correlation to necessitate error-correlation consideration. You can also use the package {glmmTMB} for some special error-correlation patterns.

added 58 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22

By (1 + factor1 * factor2 | participant), you will have 4 + 3 + 2 + 1 = 10 extra parameters to estimate for the error variance component (a variance-covariance matrix) of random effects. Because all random effects are grouped by the participant, the error term (which includes random intercepts, random coefficients, and residuals) among 24 measurements within each participants are already correlated, which results in an intra-class correlation (ICC) by $\sigma^2_\text{random} / (\sigma^2_\text{random} + \sigma^2_\text{residual})$. See https://en.wikipedia.org/wiki/Intraclass_correlation. Here, the denominator should be the sum of the 4 x 4 matrix (sum of 16 elements), whereas the numerator should be the sum of a 3 x 3 matrix less the row and column of the residuals (sum of 9 elements). We can consider that residuals are random effects grouped by each observation. Nevertheless, this unrestricted 10-unique-element matrix (a general positive-definite symmetric matrix) might be too complex. If you see any component to be close to zero or have a large standard error, you can restrict this variance component matrix to follow a simpler pattern (e.g., diagonal for only 4 parameters).

By (1 + factor1 * factor2 | participant), you will have 4 + 3 + 2 + 1 = 10 extra parameters to estimate for the error variance component (a variance-covariance matrix) of random effects. Because all random effects are grouped by the participant, the error term (which includes random intercepts, random coefficients, and residuals) among 24 measurements within each participants are already correlated, which results in an intra-class correlation (ICC) by $\sigma^2_\text{random} / (\sigma^2_\text{random} + \sigma^2_\text{residual})$. Here, the denominator should be the sum of the 4 x 4 matrix (sum of 16 elements), whereas the numerator should be the sum of a 3 x 3 matrix less the row and column of the residuals (sum of 9 elements). We can consider that residuals are random effects grouped by each observation. Nevertheless, this unrestricted 10-unique-element matrix (a general positive-definite symmetric matrix) might be too complex. If you see any component to be close to zero or have a large standard error, you can restrict this variance component matrix to follow a simpler pattern (e.g., diagonal for only 4 parameters).

By (1 + factor1 * factor2 | participant), you will have 4 + 3 + 2 + 1 = 10 extra parameters to estimate for the error variance component (a variance-covariance matrix) of random effects. Because all random effects are grouped by the participant, the error term (which includes random intercepts, random coefficients, and residuals) among 24 measurements within each participants are already correlated, which results in an intra-class correlation (ICC) by $\sigma^2_\text{random} / (\sigma^2_\text{random} + \sigma^2_\text{residual})$. See https://en.wikipedia.org/wiki/Intraclass_correlation. Here, the denominator should be the sum of the 4 x 4 matrix (sum of 16 elements), whereas the numerator should be the sum of a 3 x 3 matrix less the row and column of the residuals (sum of 9 elements). We can consider that residuals are random effects grouped by each observation. Nevertheless, this unrestricted 10-unique-element matrix (a general positive-definite symmetric matrix) might be too complex. If you see any component to be close to zero or have a large standard error, you can restrict this variance component matrix to follow a simpler pattern (e.g., diagonal for only 4 parameters).

added 88 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22
Loading
added 88 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22
Loading
added 255 characters in body
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22
Loading
Source Link
DrJerryTAO
  • 2.3k
  • 6
  • 22
Loading