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
The SAS System |
WORK.EXP865 |
dmi |
Diagonal |
cow |
REML |
Profile |
Kenward-Roger |
Kenward-Roger |
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!
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
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!
Ready to level-up your skills? Choose your own adventure.