Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after."— Presentation transcript:

1 Longitudinal data analysis Shu-Hui Wen 06122008

2 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 ?

3 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

4 \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.

5

6

7

8

9

10

11

12

13

14

15

16 水平軸擺時間,組別則用不同線 畫出 mean of response 的圖形

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45 Linear Mixed Model

46 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.

47 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 有可能有不同顧客消費狀況

48 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.

49 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.

50 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.

51

52 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.testmarket_1month.sav

53

54

55

56

57

58

59

60

61

62

63 Output

64

65

66

67

68

69

70

71

72 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


Download ppt "Longitudinal data analysis Shu-Hui Wen 06122008. Longitudinal data Data were collected repeatedly through time. –Measure of sleepiness before and after."

Similar presentations


Ads by Google