BookmarkSubscribeRSS Feed
annaliseshen
Fluorite | Level 6

PROC MIXED DATA=TRY;
CLASS TREATMENT PERIOD SEQUENCE SUBJECT;
MODEL CONC=TREATMENT PERIOD SEQUENCE/SOLUTION;
RANDOM SUBJECT(SEQUENCE);
LSMEANS TREATMENT/PDIFF=control("A","B") CL ALPHA=0.1 ;
RUN;


PROC MIXED DATA=TRY;
CLASS TREATMENT PERIOD SEQUENCE SUBJECT;
MODEL CONC=TREATMENT PERIOD SEQUENCE SUBJECT(SEQUENCE)/SOLUTION;
LSMEANS TREATMENT/PDIFF=control("A","B") CL ALPHA=0.1 ;
RUN;

 

 

 

 

 

 

The SAS System

If WE treat subject(sequence ) as fixed effect

The Mixed Procedure

Model Information

Data Set

WORK.TRY

Dependent Variable

CONC

Covariance Structure

Diagonal

Estimation Method

REML

Residual Variance Method

Profile

Fixed Effects SE Method

Model-Based

Degrees of Freedom Method

Residual

 

Class Level Information

Class

Levels

Values

TREATMENT

2

A B

PERIOD

2

1 2

SEQUENCE

2

1 2

SUBJECT

10

001 002 003 004 005 006 007 008 009 010

 

Dimensions

Covariance Parameters

1

Columns in X

17

Columns in Z

0

Subjects

1

Max Obs Per Subject

20

 

Number of Observations

Number of Observations Read

20

Number of Observations Used

20

Number of Observations Not Used

0

 

Covariance Parameter Estimates

Cov Parm

Estimate

Residual

0.4089

 

Fit Statistics

-2 Res Log Likelihood

25.7

AIC (smaller is better)

27.7

AICC (smaller is better)

28.4

BIC (smaller is better)

27.8

 

Solution for Fixed Effects

Effect

TREATMENT

SUBJECT

PERIOD

SEQUENCE

Estimate

Standard Error

DF

t Value

Pr > |t|

Intercept

 

 

 

 

3.1780

0.4953

8

6.42

0.0002

TREATMENT

A

 

 

 

1.0800

0.2860

8

3.78

0.0054

TREATMENT

B

 

 

 

0

.

.

.

.

PERIOD

 

 

1

 

-0.1160

0.2860

8

-0.41

0.6956

PERIOD

 

 

2

 

0

.

.

.

.

SEQUENCE

 

 

 

1

-0.7100

0.6395

8

-1.11

0.2991

SEQUENCE

 

 

 

2

0

.

.

.

.

SUBJECT(SEQUENCE)

 

001

 

1

-0.1750

0.6395

8

-0.27

0.7913

SUBJECT(SEQUENCE)

 

002

 

1

-0.4000

0.6395

8

-0.63

0.5490

SUBJECT(SEQUENCE)

 

003

 

1

0.3850

0.6395

8

0.60

0.5638

SUBJECT(SEQUENCE)

 

004

 

1

1.5200

0.6395

8

2.38

0.0448

SUBJECT(SEQUENCE)

 

007

 

1

0

.

.

.

.

SUBJECT(SEQUENCE)

 

005

 

2

-0.5500

0.6395

8

-0.86

0.4148

SUBJECT(SEQUENCE)

 

006

 

2

0.5000

0.6395

8

0.78

0.4568

SUBJECT(SEQUENCE)

 

008

 

2

-1.0100

0.6395

8

-1.58

0.1529

SUBJECT(SEQUENCE)

 

009

 

2

-1.6400

0.6395

8

-2.56

0.0334

SUBJECT(SEQUENCE)

 

010

 

2

0

.

.

.

.

 

Type 3 Tests of Fixed Effects

Effect

Num DF

Den DF

F Value

Pr > F

TREATMENT

1

8

14.26

0.0054

PERIOD

1

8

0.16

0.6956

SEQUENCE

1

8

0.11

0.7457

SUBJECT(SEQUENCE)

8

8

3.12

0.0641

 

Least Squares Means

Effect

TREATMENT

Estimate

Standard Error

DF

t Value

Pr > |t|

Alpha

Lower

Upper

TREATMENT

A

3.7080

0.2022

8

18.34

<.0001

0.1

3.3320

4.0840

TREATMENT

B

2.6280

0.2022

8

13.00

<.0001

0.1

2.2520

3.0040

 

Differences of Least Squares Means

Effect

TREATMENT

_TREATMENT

Estimate

Standard Error

DF

t Value

Pr > |t|

Alpha

Lower

Upper

TREATMENT

B

A

-1.0800

0.2860

8

-3.78

0.0054

0.1

-1.6118

-0.5482

3 REPLIES 3
annaliseshen
Fluorite | Level 6
continuing from my previous question, same dataset
annaliseshen
Fluorite | Level 6

PROC MIXED DATA=TRY;
CLASS TREATMENT PERIOD SEQUENCE SUBJECT;
MODEL CONC=TREATMENT PERIOD SEQUENCE/SOLUTION;
RANDOM SUBJECT(SEQUENCE);
LSMEANS TREATMENT/PDIFF=control("A","B") CL ALPHA=0.1 ;
RUN;


PROC MIXED DATA=TRY;
CLASS TREATMENT PERIOD SEQUENCE SUBJECT;
MODEL CONC=TREATMENT PERIOD SEQUENCE SUBJECT(SEQUENCE)/SOLUTION;
LSMEANS TREATMENT/PDIFF=control("A","B") CL ALPHA=0.1 ;
RUN;

 

 

 

 

 

 

The SAS System

If WE treat subject(sequence ) as fixed effect

The Mixed Procedure

Model Information

Data Set

WORK.TRY

Dependent Variable

CONC

Covariance Structure

Diagonal

Estimation Method

REML

Residual Variance Method

Profile

Fixed Effects SE Method

Model-Based

Degrees of Freedom Method

Residual

 

Class Level Information

Class

Levels

Values

TREATMENT

2

A B

PERIOD

2

1 2

SEQUENCE

2

1 2

SUBJECT

10

001 002 003 004 005 006 007 008 009 010

 

Dimensions

Covariance Parameters

1

Columns in X

17

Columns in Z

0

Subjects

1

Max Obs Per Subject

20

 

Number of Observations

Number of Observations Read

20

Number of Observations Used

20

Number of Observations Not Used

0

 

Covariance Parameter Estimates

Cov Parm

Estimate

Residual

0.4089

 

Fit Statistics

-2 Res Log Likelihood

25.7

AIC (smaller is better)

27.7

AICC (smaller is better)

28.4

BIC (smaller is better)

27.8

 

Solution for Fixed Effects

Effect

TREATMENT

SUBJECT

PERIOD

SEQUENCE

Estimate

Standard Error

DF

t Value

Pr > |t|

Intercept

 

 

 

 

3.1780

0.4953

8

6.42

0.0002

TREATMENT

A

 

 

 

1.0800

0.2860

8

3.78

0.0054

TREATMENT

B

 

 

 

0

.

.

.

.

PERIOD

 

 

1

 

-0.1160

0.2860

8

-0.41

0.6956

PERIOD

 

 

2

 

0

.

.

.

.

SEQUENCE

 

 

 

1

-0.7100

0.6395

8

-1.11

0.2991

SEQUENCE

 

 

 

2

0

.

.

.

.

SUBJECT(SEQUENCE)

 

001

 

1

-0.1750

0.6395

8

-0.27

0.7913

SUBJECT(SEQUENCE)

 

002

 

1

-0.4000

0.6395

8

-0.63

0.5490

SUBJECT(SEQUENCE)

 

003

 

1

0.3850

0.6395

8

0.60

0.5638

SUBJECT(SEQUENCE)

 

004

 

1

1.5200

0.6395

8

2.38

0.0448

SUBJECT(SEQUENCE)

 

007

 

1

0

.

.

.

.

SUBJECT(SEQUENCE)

 

005

 

2

-0.5500

0.6395

8

-0.86

0.4148

SUBJECT(SEQUENCE)

 

006

 

2

0.5000

0.6395

8

0.78

0.4568

SUBJECT(SEQUENCE)

 

008

 

2

-1.0100

0.6395

8

-1.58

0.1529

SUBJECT(SEQUENCE)

 

009

 

2

-1.6400

0.6395

8

-2.56

0.0334

SUBJECT(SEQUENCE)

 

010

 

2

0

.

.

.

.

 

Type 3 Tests of Fixed Effects

Effect

Num DF

Den DF

F Value

Pr > F

TREATMENT

1

8

14.26

0.0054

PERIOD

1

8

0.16

0.6956

SEQUENCE

1

8

0.11

0.7457

SUBJECT(SEQUENCE)

8

8

3.12

0.0641

 

Least Squares Means

Effect

TREATMENT

Estimate

Standard Error

DF

t Value

Pr > |t|

Alpha

Lower

Upper

TREATMENT

A

3.7080

0.2022

8

18.34

<.0001

0.1

3.3320

4.0840

TREATMENT

B

2.6280

0.2022

8

13.00

<.0001

0.1

2.2520

3.0040

 

Differences of Least Squares Means

Effect

TREATMENT

_TREATMENT

Estimate

Standard Error

DF

t Value

Pr > |t|

Alpha

Lower

Upper

TREATMENT

B

A

-1.0800

0.2860

8

-3.78

0.0054

0.1

-1.6118

-0.5482

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2122 views
  • 0 likes
  • 2 in conversation