Sas code and output

/*create dummy variables for carryover effects*/ DATA new; carry=treat; SET mydata; RUN; DATA new;SET new; IF period eq 1 THEN carry=4;

* setting a carryover value for the first period, it is arbitrary which treatment is selected. the choice will only influence the absolute values of the fixed effect estimates and not the difference between them;

PROC MIXED; CLASS treat period patient; TITLE 'Fixed Effect Analysis Without Carryover'; MODEL lvet=treat patient period; LSMEANS treat/DIFF PDIFF;

PROC MIXED; CLASS treat period patient;

TITLE 'Random Effects Analysis Without Carryover';

MODEL lvet=treat period/DDFM=KENWARDROGER;

RANDOM patient;

LSMEANS treat/DIFF PDIFF;

PROC MIXED; CLASS treat period patient carry; TITLE 'Fixed Effect Analysis Including Carryover'; MODEL lvet=treat patient period carry; LSMEANS treat carry/DIFF PDIFF;

PROC MIXED; CLASS treat period patient carry; TITLE 'Random Effects Analysis Including Carryover'; MODEL lvet=treat period carry/DDFM=KENWARDROGER; RANDOM patient;

LSMEANS treat carry/DIFF PDIFF;

The following output is that generated by the last PROC MIXED procedure.

Random Effects Analysis Including Carryover The Mixed Procedure

Model Information

Data Set

Dependent Variable Covariance Structure Estimation Method Residual Variance Method Fixed Effects SE Method

WORK.NEW lvet

Variance Components

REML

Profile

Prasad-Rao-Jeske-

Kackar-Harville

Kenward-Roger

Degrees of Freedom Method

Class Level Information

Class Levels Values treat 4 12 3 4

period 4 12 3 4

Dimensions

Covariance Parameters 2

Columns in X 13

Columns in Z 14

Subjects 1

Max Obs Per Subject 43

Number of Observations

Number of Observations Read 43

Number of Observations Used 43

Number of Observations Not Used 0

Iteration History

Iteration

Evaluations

-2 Res

Log Like

Criterion

0

1

390.

. 90717846

1

2

381.

. 33170184

0

.00102427

2

1

381.

. 14250906

0

.00008011

3

1

381.

12896819

0

.00000062

4

1

381.

12886806

0

.00000000

Convergence criteria met.

Covariance Parameter Estimates

Cov Parm Estimate patient 2749.71

Residual 1831.47

Fit Statistics

-2 Res Log Likelihood 381.1

AIC (smaller is better) 385.1

AICC (smaller is better) 385.5

BIC (smaller is better) 386.4

Type 3 Tests of Fixed Effects

Effect treat period carry

Den DF

23.4

F Value

0.0052 0.0226 0.9316

Least Squares Means Standard

Effect

treat

carry

Estimate

Error

DF

t Value

Pr

> |t|

treat

1

400.

10

20

.8116

27.5

19.

23

0001

treat

2

331.

02

23

.0808

30.4

14.

34

0001

treat

3

367.

99

20

.5018

26.8

17.

95

0001

treat

4

321.

12

21

.3633

29

15.

03

0001

carry

1

356.

94

23

.1999

31.3

15.

39

<.

0001

carry

2

364.

74

24

.3531

31.6

14.

98

<.

0001

carry

3

350.

07

27

.5438

33

12.

71

<.

0001

carry

4

348.

48

21

.4910

27.5

16.

22

<.

0001

Effect treat carry

Differences of Least Squares Means _treat _carry Estimate

Standard Error

DF t Value

Effect treat carry

DF t Value

treat

1

2

69.

0876

22.

1976

22.

5

3.

11

treat

1

3

32.

1188

19.

9731

22.

3

1.

61

treat

1

4

78.

9793

22.

2691

21.

5

3.

55

treat

2

3

-36.

9688

22.

4442

22.

6

-1.

65

treat

2

4

9.

8917

25.

0367

22.

3

0.

40

treat

3

4

46.

8605

22.

4790

22.

8

2.

08

carry

1

2

-7.

8017

25.

7917

23.

6

-0.

30

carry

1

3

6.

8688

30.

4508

24.

4

0.

23

carry

1

4

8.

4543

25.

8129

21.

7

0.

33

carry

2

3

14.

6705

28.

9287

23.

2

0.

51

carry

2

4

16.

2560

29.

1453

23.

8

0.

56

carry

3

4

1.

5855

33.

3982

25.

4

0.

05

Differences of Least Squares Means

Effect treat treat treat treat treat treat carry carry carry carry carry carry

Differences of Least Squares Means carry

_carry

0.0050 0.1219 0.0019 0.1133 0.6965 0.0485 0.7649 0.8234 0.7464 0.6168 0.5822 0.9625

treat treat

0 0

Post a comment