BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
dcreyesg
Calcite | Level 5

Hello, I am trying to run the following data (see part of the data), and the output is just showing the model information. Can you please let me know what is wrong. Thanks in advance

 

data exp;
input replicate method cow block intake;
cards;
1 GF 1723 2 24.8
1 OW 1723 2 24.7
1 RC 1723 2 24.2
1 GF 2334 1 26.2
1 OW 2334 1 25.2
1 RC 2334 1 24.9
1 GF 2341 3 22.1
1 OW 2341 3 23.8
1 RC 2341 3 20.9
1 GF 2351 2 23.1
1 OW 2351 2 .
1 RC 2351 2 .
 
proc mixed;
class replicate method cow block;
model intake = replicate method block/ddfm=KENWARDROGER;
random int/subject = cow;
lsmeans method/pdiff adjust=tukey;
run;
 
This is the only output=
 
The SAS System

The Mixed Procedure

 

Model InformationData SetDependent VariableCovariance StructureSubject EffectEstimation MethodResidual Variance MethodFixed Effects SE MethodDegrees of Freedom Method
WORK.EXP865
dmi
Diagonal
cow
REML
Profile
Kenward-Roger
Kenward-Roger
1 ACCEPTED SOLUTION

Accepted Solutions
JackieJ_SAS
SAS Employee

Hi, Thank you for the log. I also ran your code.


The issue is with your DATA step. The second variable in your INPUT statement, METHOD, take character values, but you haven't specified that in your code. Because of this, all the values of METHOD were missing in your output dataset. PROC MIXED throws out all observations with a missing value on ANY variable specified in the model. So- since METHOD is missing for all observations, PROC MIXED threw out all the all observations in your dataset and didn't run.

Trying adding a $ after METHOD on the input statement:

input replicate method $ cow block intake;

In general, I would also add a semi-colon at the end of your DATA step and explicitly reference a dataset name when calling PROC MIXED. So:

data exp;
input replicate method $ cow block intake;
cards;
1 GF 1723 2 24.8
1 OW 1723 2 24.7
1 RC 1723 2 24.2
1 GF 2334 1 26.2
1 OW 2334 1 25.2
1 RC 2334 1 24.9
1 GF 2341 3 22.1
1 OW 2341 3 23.8
1 RC 2341 3 20.9
1 GF 2351 2 23.1
1 OW 2351 2 .
1 RC 2351 2 .
; 
 
proc mixed data=exp;
class replicate method cow block;
model intake = replicate method block/ddfm=KENWARDROGER;
random int/subject = cow;
lsmeans method/pdiff adjust=tukey;
run;

Running this gives me output. Good luck!



View solution in original post

3 REPLIES 3
JackieJ_SAS
SAS Employee
Hi, please post your log for us as well, both for the DATA step and PROC MIXED. Thank you.
dcreyesg
Calcite | Level 5

Hi! This is my log =

 

NOTE: With DDFM=SATTERTHWAITE or DDFM=KENWADROGER or DDFM=KENWADROGER2, unadjusted p-values in tests are based on the degrees of freedom specific to that comparison. P-values that are adjusted for multiplicity, however, are by default based on the denominator degrees of freedom for the Type 3 test of the fixed effect. If you specify the ADJDFE=ROW option in
the LSMEANS statement, the adjusted p-values take into account the row-wise degrees of
freedom.


ERROR: Invalid or missing data.


NOTE: PROCEDURE MIXED used (Total process time):
real time 1.00 seconds
cpu time 0.48 seconds

JackieJ_SAS
SAS Employee

Hi, Thank you for the log. I also ran your code.


The issue is with your DATA step. The second variable in your INPUT statement, METHOD, take character values, but you haven't specified that in your code. Because of this, all the values of METHOD were missing in your output dataset. PROC MIXED throws out all observations with a missing value on ANY variable specified in the model. So- since METHOD is missing for all observations, PROC MIXED threw out all the all observations in your dataset and didn't run.

Trying adding a $ after METHOD on the input statement:

input replicate method $ cow block intake;

In general, I would also add a semi-colon at the end of your DATA step and explicitly reference a dataset name when calling PROC MIXED. So:

data exp;
input replicate method $ cow block intake;
cards;
1 GF 1723 2 24.8
1 OW 1723 2 24.7
1 RC 1723 2 24.2
1 GF 2334 1 26.2
1 OW 2334 1 25.2
1 RC 2334 1 24.9
1 GF 2341 3 22.1
1 OW 2341 3 23.8
1 RC 2341 3 20.9
1 GF 2351 2 23.1
1 OW 2351 2 .
1 RC 2351 2 .
; 
 
proc mixed data=exp;
class replicate method cow block;
model intake = replicate method block/ddfm=KENWARDROGER;
random int/subject = cow;
lsmeans method/pdiff adjust=tukey;
run;

Running this gives me output. Good luck!



hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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