Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly...

72
Longitudinal data analysis Shu-Hui Wen 06122008

Transcript of Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly...

Page 1: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

Longitudinal data analysis

Shu-Hui Wen

06122008

Page 2: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

Longitudinal data

• Data were collected repeatedly through time. – Measure of sleepiness before and after

administration of either alcohol or placebo.

• What is of interest? – Quantifying the effect of alcohol on the

change in sleepiness. – Time effect ?

Page 3: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

Strategies

1. Analysis of the difference scores• e.g. two-sample t test for difference scores

for two samples

2. Repeated measure analysis • GLM-Repeated measure

3. Regression analysis with the baseline measurement as the adjustment covariate

• e.g. ANCOVA

Page 4: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

\tutorial\sample_files\ subdirectory

• testmarket.sav. This hypothetical data file concerns a fast food chain's plans to add a new item to its menu. There are three possible campaigns for promoting the new product, so the new item is introduced at locations in several randomly selected markets. A different promotion is used at each location, and the weekly sales of the new item are recorded for the first four weeks. Each case corresponds to a separate location-week.

Response variables: Sales

Covariates: Between-subject: Promotions; Markets;

Within-subject: Repeated time effect.

Page 5: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 6: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 7: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 8: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 9: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 10: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 11: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 12: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 13: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 14: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 15: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 16: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

水平軸擺時間,組別則用不同線

畫出mean of response 的圖形

Page 17: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 18: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 19: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 20: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 21: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 22: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 23: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 24: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 25: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 26: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 27: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 28: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 29: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 30: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 31: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 32: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 33: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 34: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 35: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 36: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 37: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 38: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 39: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 40: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 41: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 42: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 43: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 44: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 45: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

Linear Mixed Model

Page 46: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• The linear mixed model is an extension of the general linear model, in which factors and covariates are assumed to have a linear relationship to the dependent variable.

• Factors. Categorical predictors should be selected as factors in the model. Each level of a factor can have a different linear effect on the value of the dependent variable.

• Fixed-effects factors are generally thought of as variables whose values of interest are all represented in the data file.

• Random-effects factors are variables whose values in the data file can be considered a random sample from a larger population of values. They are useful for explaining excess variability in the dependent variable.

Page 47: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• For example, a grocery store chain is interested in the effects of five different types of coupons on customer spending. At several store locations, these coupons are handed out to customers who frequent that location; one coupon selected at random is distributed to each customer.

• The type of coupon is a fixed effect because the company is interested in those particular coupons. The store location is a random effect because the locations used are a sample from the larger population of interest, and while there is likely to be store-to-store variation in customer spending, the company is not directly interested in that variation in the context of this problem.

不同 store有可能有不同顧客消費狀況

Page 48: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• Covariates. Scale predictors should be selected as covariates in the model. Within combinations of factor levels (or cells), values of covariates are assumed to be linearly correlated with values of the dependent variables.

• Interactions. The Linear Mixed Models procedure allows you to specify factorial interactions, which means that each combination of factor levels can have a different linear effect on the dependent variable. Additionally, you may specify factor-covariate interactions, if you believe that the linear relationship between a covariate and the dependent variable changes for different levels of a factor.

• Random effects covariance structure. The Linear Mixed Models procedure allows you to specify the relationship between the levels of random effects. By default, levels of random effects are uncorrelated and have the same variance.

Page 49: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• Repeated effects. Factors and covariates are features of the general linear model. In the Linear Mixed Models procedure, repeated effects variables are added, allowing you to relax the assumption of independence of the error terms. In order to model the covariance structure of the error terms, you need to specify the following:

• Repeated effects variables are variables whose values in the data file can be considered as markers of multiple observations of a single subject.

• Subject variables define the individual subjects of the repeated measurements. The error terms for each individual are independent of those of other individuals.

• The covariance structure specifies the relationship between the levels of the repeated effects. The types of covariance structures available allow for residual terms with a wide variety of variances and covariances.

Page 50: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• For example, if the grocery store recorded the purchasing habits of their customers for four consecutive weeks, then the variable Week would be a repeated effects variable. Specifying a subject variable denoting the Customer ID differentiates the repeated observations of separate customers. Specifying a first-order autoregressive covariance structure reflects your belief that a higher-than-average volume of purchases in one week will correspond to a higher (or lower)-than-average volume in the following week.

Page 51: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 52: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• A fast food chain plans to add a new item to its menu. However, they are still undecided between three possible campaigns for promoting the new product. In order to determine which promotion has the greatest effect on sales, the new item is introduced at locations in several randomly selected markets. A different promotion is used at each location, and the first month sales of the new item recorded.

• This information is collected in testmarket_1month.sav . Use the Linear Mixed Models procedure to measure the effect of each promotion on sales.

Page 53: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 54: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 55: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 56: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 57: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 58: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 59: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 60: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 61: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 62: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 63: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

• Output

Page 64: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 65: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 66: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 67: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 68: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 69: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 70: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 71: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.
Page 72: Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after.

References

• Analysis of Longitudinal data by Diggle P.J., Heagerty P.J., Liang K.Y., Zeger S.L. Oxford university press (2nd ed. 2002)

• Generalized Estimating Equations by Hardin J.W., Hilbe J.M. Chapman & Hall 2003