- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc glimmix data=data1; class treatment block; model weight = treatment; random block; run;
By using the SAS OnDemand for Academics, the default decimal number of the output is 4, how to increase to 6. Thank you very much in advance!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the solution option to your model statement to have the parameterEstimates displayed. But this means you actually want a different table most likely.
In that case, look for the table name of the table you actually want to save.
Here's some instructions and explanations on how to capture output that is shown.
https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods...
Table names are documented here as well:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_details80.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Adding the following line to your proc will save the estimates to a dataset.
ods output parameterEstimates = want;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
WARNING: Output 'parameterEstimates' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data cecal_kingdom_taxonomy;
length treatment $20;
Infile "/home/u39233094/sasuser.v94/Thesis/CSV file/1-kingdom cecal taxonomy for SAS.csv" dlm="," firstobs=5;
input diet$ treatment$ block pen pig_number DNAsamcode$ unidentifiedR unidentifiedP bacteriaR bacteriaP eukaryotaR eukaryotaP totalR totalP; run;
Proc print data=cecal_kingdom_taxonomy;
run;
proc glimmix data=cecal_kingdom_taxonomy;
class treatment block;
model unidentifiedP = treatment;
random block;
lsmeans treatment/tdiff lines;
ods output parameterEstimates = want;
run;
log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 data cecal_kingdom_taxonomy;
75 length treatment $20;
76 Infile "/home/u39233094/sasuser.v94/Thesis/CSV file/1-kingdom cecal taxonomy for SAS.csv" dlm="," firstobs=5;
77 input diet$ treatment$ block pen pig_number DNAsamcode$ unidentifiedR unidentifiedP bacteriaR bacteriaP eukaryotaR
77 ! eukaryotaP totalR totalP;
78 run;
NOTE: The infile "/home/u39233094/sasuser.v94/Thesis/CSV file/1-kingdom cecal taxonomy for SAS.csv" is:
Filename=/home/u39233094/sasuser.v94/Thesis/CSV file/1-kingdom cecal taxonomy for SAS.csv,
Owner Name=u39233094,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=03Jun2021:11:31:01,
File Size (bytes)=3921
NOTE: 35 records were read from the infile "/home/u39233094/sasuser.v94/Thesis/CSV file/1-kingdom cecal taxonomy for SAS.csv".
The minimum record length was 99.
The maximum record length was 109.
NOTE: The data set WORK.CECAL_KINGDOM_TAXONOMY has 35 observations and 14 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 790.53k
OS Memory 39336.00k
Timestamp 06/08/2021 09:22:05 PM
Step Count 132 Switch Count 2
Page Faults 0
Page Reclaims 94
Page Swaps 0
Voluntary Context Switches 19
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
79 Proc print data=cecal_kingdom_taxonomy;
80 run;
NOTE: There were 35 observations read from the data set WORK.CECAL_KINGDOM_TAXONOMY.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.16 seconds
user cpu time 0.17 seconds
system cpu time 0.00 seconds
memory 3365.93k
OS Memory 39336.00k
Timestamp 06/08/2021 09:22:06 PM
Step Count 133 Switch Count 0
Page Faults 0
Page Reclaims 63
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 48
81 proc glimmix data=cecal_kingdom_taxonomy;
82 class treatment block;
83 model unidentifiedP = treatment;
84 random block;
85 lsmeans treatment/tdiff lines;
86 ods output parameterEstimates = want;
87 run;
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
WARNING: Output 'parameterEstimates' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 0.12 seconds
user cpu time 0.12 seconds
system cpu time 0.01 seconds
memory 4969.46k
OS Memory 41476.00k
Timestamp 06/08/2021 09:22:06 PM
Step Count 134 Switch Count 13
Page Faults 0
Page Reclaims 900
Page Swaps 0
Voluntary Context Switches 76
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 1632
88
89 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
101
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The ODS OUTPUT statement(s) should go either immediately prior to the proc or as part of the Procedure code and have to rerun the procedure with the option on such as:
ods output parameterestimates= myparmdataset;
proc glimmix data=data1; class treatment block; model weight = treatment; random block; run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
WARNING: Output 'parameterEstimates' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the solution option to your model statement to have the parameterEstimates displayed. But this means you actually want a different table most likely.
In that case, look for the table name of the table you actually want to save.
Here's some instructions and explanations on how to capture output that is shown.
https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods...
Table names are documented here as well:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_details80.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
it works now, thank you so much!
The code is
ods output LSMeans = myparmdataset;
proc glimmix data=data1;
class treatment block;
model weight = treatment;
random block;
lsmeans treatment/tdiff lines;
run;
proc print data=myparmdataset;
format estimate D8.6
stderr D8.6;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When CLASS variables are present, the default behavior of PROC GLIMMIX is to NOT produce parameter estimates, and so no output data set parameterestimates. But, this option fixes the issue
model weight = treatment/solution;
Which brings us to a philosophical discussion. SAS (and others) thinks that if you have a class variable, you want to compare means and not really fit a model. I happen to agree with that, for what it's worth (and no, SAS isn't paying me anything to say that). You apparently have the opposite opinion, you want to do the model fit with class variables, and not compare means. Of course, that's not wrong, and you are certainly entitled to fit the model instead of compare the means. But you might want to think about it more, and see if what you really need to know is the difference between the means.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for helping me out!