Analysing repeated measurements whilst accounting for derivative tracking, varying within-subject variance and autocorrelation: the xtiou command

Similar documents
Latent class analysis and finite mixture models with Stata

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data

Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator

Mixed effects models

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis

LOGISTIC REGRESSION Joseph M. Hilbe

Measures of Fit from AR(p)

QIC program and model selection in GEE analyses

Recent Developments in Multilevel Modeling

Confidence intervals for the variance component of random-effects linear models

PSC 8185: Multilevel Modeling Fitting Random Coefficient Binary Response Models in Stata

Longitudinal + Reliability = Joint Modeling

Homework Solutions Applied Logistic Regression

GMM Estimation in Stata

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes

Lecture 2: Poisson and logistic regression

options description set confidence level; default is level(95) maximum number of iterations post estimation results

Multilevel Modeling Day 2 Intermediate and Advanced Issues: Multilevel Models as Mixed Models. Jian Wang September 18, 2012

especially with continuous

Case of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only)

Estimating Markov-switching regression models in Stata

Lecture 5: Poisson and logistic regression

Lecture 3 Linear random intercept models

Outline. Mixed models in R using the lme4 package Part 3: Longitudinal data. Sleep deprivation data. Simple longitudinal data

Outline. Statistical inference for linear mixed models. One-way ANOVA in matrix-vector form

Acknowledgements. Outline. Marie Diener-West. ICTR Leadership / Team INTRODUCTION TO CLINICAL RESEARCH. Introduction to Linear Regression

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Nonlinear mixed-effects models using Stata

Lecture notes to Stock and Watson chapter 8

Monday 7 th Febraury 2005

Longitudinal Data Analysis

Compare Predicted Counts between Groups of Zero Truncated Poisson Regression Model based on Recycled Predictions Method

PAPER 218 STATISTICAL LEARNING IN PRACTICE

Linear Modelling in Stata Session 6: Further Topics in Linear Modelling

multilevel modeling: concepts, applications and interpretations

Introduction to lnmle: An R Package for Marginally Specified Logistic-Normal Models for Longitudinal Binary Data

Understanding the multinomial-poisson transformation

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Lecture 4: Generalized Linear Mixed Models

PAPER 206 APPLIED STATISTICS

One-stage dose-response meta-analysis

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models

General Linear Model (Chapter 4)

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam

crreg: A New command for Generalized Continuation Ratio Models

8. Nonstandard standard error issues 8.1. The bias of robust standard errors

[Part 2] Model Development for the Prediction of Survival Times using Longitudinal Measurements

4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2. Mean: where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore,

Analysis of Longitudinal Data: Comparison between PROC GLM and PROC MIXED.

Correlation and Simple Linear Regression

Categorical and Zero Inflated Growth Models

Determining the number of components in mixture models for hierarchical data

Introduction to Within-Person Analysis and RM ANOVA

Fractional Polynomials and Model Averaging

Description Syntax for predict Menu for predict Options for predict Remarks and examples Methods and formulas References Also see

Section Least Squares Regression

point estimates, standard errors, testing, and inference for nonlinear combinations

Varieties of Count Data

1 A Review of Correlation and Regression

Pre-test post test, or longitudinal data with baseline

Review of CLDP 944: Multilevel Models for Longitudinal Data

1: a b c d e 2: a b c d e 3: a b c d e 4: a b c d e 5: a b c d e. 6: a b c d e 7: a b c d e 8: a b c d e 9: a b c d e 10: a b c d e

Name: Biostatistics 1 st year Comprehensive Examination: Applied in-class exam. June 8 th, 2016: 9am to 1pm

Group Comparisons: Differences in Composition Versus Differences in Models and Effects

An R # Statistic for Fixed Effects in the Linear Mixed Model and Extension to the GLMM

MLMED. User Guide. Nicholas J. Rockwood The Ohio State University Beta Version May, 2017

Modelling geoadditive survival data

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model

1 The basics of panel data

Addition to PGLR Chap 6

A Journey to Latent Class Analysis (LCA)

Meta-analysis of epidemiological dose-response studies

Mixed models in R using the lme4 package Part 2: Longitudinal data, modeling interactions

Regression tree-based diagnostics for linear multilevel models

Modelling Rates. Mark Lunt. Arthritis Research UK Epidemiology Unit University of Manchester

STATISTICS 110/201 PRACTICE FINAL EXAM

Marginal effects and extending the Blinder-Oaxaca. decomposition to nonlinear models. Tamás Bartus

sociology 362 regression

NELS 88. Latent Response Variable Formulation Versus Probability Curve Formulation

Regression I: Mean Squared Error and Measuring Quality of Fit

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

Lab 10 - Binary Variables

stcrmix and Timing of Events with Stata

36-309/749 Experimental Design for Behavioral and Social Sciences. Dec 1, 2015 Lecture 11: Mixed Models (HLMs)

Testing methodology. It often the case that we try to determine the form of the model on the basis of data

Multivariate random-effects meta-analysis

mi estimate : regress newrough_ic Current Torch_height Slowoncurves E_0 G_0 Current > 2 Pressure2 Cut_speed2 Presscutspeed, noconstant

Model Estimation Example

Problem Set 10: Panel Data

Generalized linear models

Introduction to SAS proc mixed

Step 2: Select Analyze, Mixed Models, and Linear.

Soc 63993, Homework #7 Answer Key: Nonlinear effects/ Intro to path analysis

Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgments References Also see

Non-linear least squares

Describing Within-Person Change over Time

Answer to exercise: Blood pressure lowering drugs

Lecture#17. Time series III

Generalized Linear. Mixed Models. Methods and Applications. Modern Concepts, Walter W. Stroup. Texts in Statistical Science.

Transcription:

Analysing repeated measurements whilst accounting for derivative tracking, varying within-subject variance and autocorrelation: the xtiou command R.A. Hughes* 1, M.G. Kenward 2, J.A.C. Sterne 1, K. Tilling 1 1 School of Social and Community Medicine University of Bristol 2 Luton, London * Funded by the Medical Research Council

Introduction The linear mixed effects model (Laird and Ware, 1982) is commonly used to model biomarker trajectories Linear mixed effects (LME) model for subject i Y i = X i β + Z i u i + e i fixed effects: β random effects: u i N(0, G) measurement errors: e i N(0,σ 2 I) u i and e i are independent LME model assumes: within subject errors are independent variance of within subject errors is constant

Integrated Ornstein Uhlenbeck process Taylor et al (1994) proposed LME model with added Integrated Ornstein-Uhlenbeck (IOU) process Linear Mixed Effects IOU (LME IOU) model IOU process quantifies the degree of derivative tracking tendency of measurements to maintain the same trajectory estimated from the data IOU process indexed by α and τ small α and τ : strong derivative tracking large α and τ : weak derivative tracking Special case: α with τ/α held constant scaled Brownian Motion (BM) process BM process indexed by φ Linear Mixed Effects BM (LME BM) model

Different degrees of derivative tracking 5 Predicted biomarker measurement 4 3 2 1 0 without IOU process weak derivative tracking moderate derivative tracking very weak derivative tracking 0 1 2 3 4 5 Time in years since disease onset

Linear mixed effects IOU (or BM) model LME IOU (or BM) model for subject i Y i = X i β + Z i u i + w i + e i w i is independent of u i and e i w i N(0, H i ) IOU covariance function at time points s and t τ 2 2α3[2α min(s, t)+exp( αs)+exp( αt) 1 exp( α t s )] BM covariance function at time points s and t φs if s t LME IOU (or BM) model also allows for: correlated within subject error variance of within subject errors can change over time

Estimation of the LME IOU (or BM) model Estimate variance parameters components of random effects covariance matrix G IOU parameters α and τ (or BM parameter φ) measurement error variance σ 2 REestricted Maximum Likelihood (REML) Profile REML function with respect to σ 2 Log-Cholesky parameterization for G To ensure resulting estimate is positive semi-definite Optimization using Newton-Raphson type algorithms Mata function optimize Wolfinger et al (1994) s method to efficiently calculate log-likelihood and its 1st and 2nd derivatives Implemented in MATA

The xtiou command Fits the linear mixed effects IOU model option to fit the linear mixed effects BM model Shares features of a Stata regression command supports factor notation ([U] 11.4.3 Factor variables) supports maximization options ([R] maximize) returns results in e() supports estimates predict generates predictions under the fitted model: fixed portion linear prediction standard error of the fixed portion linear prediction fitted values residuals (response minus fitted values)

Default syntax of xtiou xtiou depvar [ indepvars ] [ if ] [ in ], id(levelvar) time(timevar) [ other_options ] Data required to be in long format subjects at level-2 measurements at level-1 Required options id(levelvar) identifies subjects time(timevar) defines the time variable for the measurements By default: includes a constant term in the fixed portion includes only a random intercept includes an IOU process

Options for model structure reffects(varlist) defines the random-effects of the model assumes an unstructured covariance matrix factor variables not allowed brownian specifies a scaled Brownian Motion process fits a LME BM model

Option for the starting values By default starting values derived assuming strong derivative tracking fits linear mixed effects model using mixed EM estimates used as starting values for random-effects covariance matrix and measurement error variance IOU or BM parameters set to small positive values svdataderived derives starting values making no assumptions about derivative tracking including IOU or Brownian Motion parameters derived from variances and covariances of the observed measurements across subjects assumes random effects includes either a random intercept and/or a random linear slope

Option for the IOU process iou(ioutype) specifies the parameterization of the IOU process used during estimation where ioutype is ioutype Description at alpha and tau, the default ao alpha and omega = (tau alpha) 2 et eta = ln(alpha) and tau eo eta = ln(alpha) and omega = (tau alpha) 2 it iota = alpha 2 and tau eo iota = alpha 2 and omega = (tau alpha) 2 Changing IOU parameterization may improve convergence

Options for maximization By default uses modified Newton-Raphson algorithm algorithm(algorithm_spec) specifies one or more optimization algorithms Newton-Raphson algorithm Fisher-Scoring algorithm Average-Information algorithm Includes maximize options ([R] maximize) common to Stata regression commands iterate(#), nolog, trace, gradient, showstep, hessian, difficult

Example Simulated data based on characteristics of a HIV cohort study (UK CHIC study 2004) Patient s CD4 cell counts measured every 3 months CD4 cell counts used to monitor a patient s: response to therapy HIV disease progression Patient characteristics sex age at start of therapy ethnicity (white, black African, other) risk for HIV infection (homosexual, heterosexual, other) pre-therapy CD4 cell count group (0 to 99, 100 to 199, 200 to 349 and 350 cells/mm 3 )

Simulated Data Unbalanced data of 1000 patients with up to 5 years of follow-up Patient characteristics simulated under general location model categorical variables: multinomial distribution continuous given categorical variables: Normal distribution Simulated repeated CD4 counts (natural log scale) under LME BM model population ln CD4 trajectory: fractional polynomial with powers 0 and 0.5 patient characteristics included as fixed effects intercept and fractional powers included as random effects BM process

Comparisons Fit LMEs with differing variance structures ri: random intercept rfp: random intercept and fractional polynomial powers riiou: random intercept and IOU process ribm: random intercept and BM process rfpiou: random intercept and fractional polynomial powers, and IOU process rfpbm: random intercept and fractional polynomial powers, and BM process

Comparisons Fit LMEs with differing variance structures: ri: random intercept rfp: random intercept and fractional polynomial powers riiou: random intercept and IOU process ribm: random intercept and BM process rfpiou: random intercept and fractional polynomial powers, and IOU process rfpbm: random intercept and fractional polynomial powers, and BM process

Comparisons Fit LMEs with differing variance structures: ri: random intercept rfp: random intercept and fractional polynomial powers riiou: random intercept and IOU process ribm: random intercept and BM process rfpiou: random intercept and fractional polynomial powers, and IOU process rfpbm: random intercept and fractional polynomial powers, and BM process

Comparisons Fit LMEs with differing variance structures: ri: random intercept rfp: random intercept and fractional polynomial powers riiou: random intercept and IOU process ribm: random intercept and BM process rfpiou: random intercept and fractional polynomial powers, and IOU process rfpbm: random intercept and fractional polynomial powers, and BM process

Comparisons Fit LMEs with differing variance structures: ri: random intercept rfp: random intercept and fractional polynomial powers riiou: random intercept and IOU process ribm: random intercept and BM process rfpiou: random intercept and fractional polynomial powers, and IOU process rfpbm: random intercept and fractional polynomial powers, and BM process All models have the same, correct mean structure Compare model fit and accuracy of patient-level predictions

Random intercept IOU model Fit the LME IOU model xtiou lncd4 time_ln time_05 age sex i.risk /// i.ethnicity ib2.baselinecd4, id(patid) time(time) svdata Post estimation estimates store riiou_model predict riiou_fit, fitted predict riiou_res, residuals

Linear mixed IOU REML regression Number of obs = 15526 Number of groups = 1000 Obs per group : min = 2 avg = 15.5 Restricted log likelihood = -6169.4427 max = 26 lncd4 Coef. Std. Err. z P > z [95% Conf. Interval] time_ln.1232436.0223509 5.51 0.000.0794366.1670506 time_05.077378.0500194 1.55 0.122 -.0206582.1754142 age -.0000926.0014625-0.06 0.950 -.002959.0027738 sex.0923211.0441723 2.09 0.037.0057449.1788972 risk heterosexual -.1314315.0452229-2.91 0.004 -.2200668 -.0427961 other risk -.1403481.0555603-2.53 0.012 -.2492443 -.0314519 _cons 4.151499.0803116 51.69 0.000 3.994091 4.308907 Variance parameters Estimate Std. Err. [95% Conf. Interval] Random-effects: IOU-effects: Var(_cons).1320698.0080314.1172301.148788 alpha.9403315.1105896.7467442 1.184105 tau.4873562.0409801.4133049.5746751 Var(Measure. Err.).0747382.0011132.0725879.0769522

Linear mixed IOU REML regression Number of obs = 15526 Number of groups = 1000 Obs per group : min = 2 avg = 15.5 Restricted log likelihood = -6169.4427 max = 26 lncd4 Coef. Std. Err. z P > z [95% Conf. Interval] time_ln.1232436.0223509 5.51 0.000.0794366.1670506 time_05.077378.0500194 1.55 0.122 -.0206582.1754142 age -.0000926.0014625-0.06 0.950 -.002959.0027738 sex.0923211.0441723 2.09 0.037.0057449.1788972 risk heterosexual -.1314315.0452229-2.91 0.004 -.2200668 -.0427961 other risk -.1403481.0555603-2.53 0.012 -.2492443 -.0314519 _cons 4.151499.0803116 51.69 0.000 3.994091 4.308907 Variance parameters Estimate Std. Err. [95% Conf. Interval] Random-effects: IOU-effects: Var(_cons).1320698.0080314.1172301.148788 alpha.9403315.1105896.7467442 1.184105 tau.4873562.0409801.4133049.5746751 Var(Measure. Err.).0747382.0011132.0725879.0769522

Linear mixed IOU REML regression Number of obs = 15526 Number of groups = 1000 Obs per group : min = 2 avg = 15.5 Restricted log likelihood = -6169.4427 max = 26 lncd4 Coef. Std. Err. z P > z [95% Conf. Interval] time_ln.1232436.0223509 5.51 0.000.0794366.1670506 time_05.077378.0500194 1.55 0.122 -.0206582.1754142 age -.0000926.0014625-0.06 0.950 -.002959.0027738 sex.0923211.0441723 2.09 0.037.0057449.1788972 risk heterosexual -.1314315.0452229-2.91 0.004 -.2200668 -.0427961 other risk -.1403481.0555603-2.53 0.012 -.2492443 -.0314519 _cons 4.151499.0803116 51.69 0.000 3.994091 4.308907 Variance parameters Estimate Std. Err. [95% Conf. Interval] Random-effects: IOU-effects: Var(_cons).1320698.0080314.1172301.148788 alpha.9403315.1105896.7467442 1.184105 tau.4873562.0409801.4133049.5746751 Var(Measure. Err.).0747382.0011132.0725879.0769522

Linear mixed IOU REML regression Number of obs = 15526 Number of groups = 1000 Obs per group : min = 2 avg = 15.5 Restricted log likelihood = -6169.4427 max = 26 lncd4 Coef. Std. Err. z P > z [95% Conf. Interval] time_ln.1232436.0223509 5.51 0.000.0794366.1670506 time_05.077378.0500194 1.55 0.122 -.0206582.1754142 age -.0000926.0014625-0.06 0.950 -.002959.0027738 sex.0923211.0441723 2.09 0.037.0057449.1788972 risk heterosexual -.1314315.0452229-2.91 0.004 -.2200668 -.0427961 other risk -.1403481.0555603-2.53 0.012 -.2492443 -.0314519 _cons 4.151499.0803116 51.69 0.000 3.994091 4.308907 Variance parameters Estimate Std. Err. [95% Conf. Interval] Random-effects: IOU-effects: Var(_cons).1320698.0080314.1172301.148788 alpha.9403315.1105896.7467442 1.184105 tau.4873562.0409801.4133049.5746751 Var(Measure. Err.).0747382.0011132.0725879.0769522

Linear mixed IOU REML regression Number of obs = 15526 Number of groups = 1000 Obs per group : min = 2 avg = 15.5 Restricted log likelihood = -6249.6745 max = 26 lncd4 Coef. Std. Err. z P > z [95% Conf. Interval] time_ln.1283745.0226364 5.67 0.000.0840079.1727412 time_05.0690668.0467146 1.48 0.139 -.0224921.1606258 age -.0001694.0014558-0.12 0.907 -.0030227.0026839 sex.0946172.044012 2.15 0.032.0083553.1808791 risk heterosexual -.1316994.0450399-2.92 0.003 -.219976 -.0434228 other risk -.1305444.05534-2.36 0.018 -.2390088 -.02208 _cons 4.162428.0797391 52.20 0.000 4.006142 4.318714 Variance parameters Estimate Std. Err. [95% Conf. Interval] Random-effects: BM-effects: Var(_cons).1110791.0079717.0965037.1278559 phi.1377509.0038615.1303865.1455313 Var(Measure. Err.).0597721.0010262.0577943.0618177

Compare model fit. estimates stats /// > ri_model riiou_model ribm_model /// > rfp_model rfpbm_model rfpiou_model (output omitted ) Akaike Information Criterion (AIC) Bayesian Information Criterion (BIC) Model AIC BIC random intercept only 22481 22589 random intercept & IOU 12371 12493 random intercept & BM 12529 12644 random fractional powers 12793 12938 random fractional powers & IOU 12130 12267 random fractional powers & BM 12128 12258

Compare model fit. estimates stats /// > ri_model riiou_model ribm_model /// > rfp_model rfpbm_model rfpiou_model (output omitted ) Akaike Information Criterion (AIC) Bayesian Information Criterion (BIC) Model AIC BIC random intercept only 22481 22589 random intercept & IOU 12371 12493 random intercept & BM 12529 12644 random fractional powers 12793 12938 random fractional powers & IOU 12130 12267 random fractional powers & BM 12128 12258

Compare model fit. estimates stats /// > ri_model riiou_model ribm_model /// > rfp_model rfpbm_model rfpiou_model (output omitted ) Akaike Information Criterion (AIC) Bayesian Information Criterion (BIC) Model AIC BIC random intercept only 22481 22589 random intercept & IOU 12371 12493 random intercept & BM 12529 12644 random fractional powers 12793 12938 random fractional powers & IOU 12130 12267 random fractional powers & BM 12128 12258

Changes in variance over time 1.4 1.2 Variance of lncd4 1.8.6.4.2 0 0 1 2 3 4 5 Time in years observed ri rfp riiou ribm rfpiou rfpbm

Changes in correlation over time 1 Correlation with first measure.8.6.4.2 0 0 1 2 3 4 5 Time in years observed ri rfp riiou ribm rfpiou rfpbm

Comparison of the fitted values Average squared difference between predicted and observed measurements Mean Squared Error (MSE) Number of predicted measurements within 5% of the observed Model MSE Within 5% random intercept only 0.1867 5970 random intercept & IOU 0.0597 8844 random intercept & BM 0.0382 10441 random fractional powers 0.0727 8227 random fractional powers & IOU 0.0491 9522 random fractional powers & BM 0.0465 9738

Comparison of the fitted values Average squared difference between predicted and observed measurements Mean Squared Error (MSE) Number of predicted measurements within 5% of the observed Model MSE Within 5% random intercept only 0.1867 5970 random intercept & IOU 0.0597 8844 random intercept & BM 0.0382 10441 random fractional powers 0.0727 8227 random fractional powers & IOU 0.0491 9522 random fractional powers & BM 0.0465 9738

Comparison of the fitted values Average squared difference between predicted and observed measurements Mean Squared Error (MSE) Number of predicted measurements within 5% of the observed Model MSE Within 5% random intercept only 0.1867 5970 random intercept & IOU 0.0597 8844 random intercept & BM 0.0382 10441 random fractional powers 0.0727 8227 random fractional powers & IOU 0.0491 9522 random fractional powers & BM 0.0465 9738

Discussion xtiou fits LME IOU model or LME BM model These models allow for autocorrelation changing within subject variance incorporation of derivative tracking Options available to solve convergence problems svdataderived iou(ioutype) algorithm(algorithm_spec) difficult Accompanying predict command Does not provide BLUPs of random effects nor realizations of IOU (or BM) process Hope our command will help statisticians apply the LME IOU model and LME BM model to their data

References Laird N and Ware J (1982) Random-Effects Models for Longitudinal Data Biometrics 38: 963-974. Taylor JMG, Cumberland WG and Sy PJ (1994) A stochastic model for analysis of longitudinal AIDS data Journal of the American Statistical Association 89: 727-736. UK Collaborative HIV Cohort Steering Committee (2004) The creation of a large UK based multicentre cohort of HIV-infected individuals: the UK Collaborative HIV Cohort (UK CHIC) Study HIV Medicine 5: 115-124. Wolfinger R, Tobias R and Sall J (1994) Computing Gaussian likelihoods and their derivatives for the general linear mixed model SIAM J Sci Comput 15: 1294-1310.