Hello,
Please, I need help calculating the weighted median and confidence interval of for hospital_free_days by telemed_use across 5 imputations.
The proc surveymeans is ignoring the class statement and also refusing to create the ods output domain = outex1 ;
Please, I also need help with the right Proc MI analyze code.
I am using the following SAS code.
Thank you.
proc surveymeans data=Avera_matched_data q1 q3 median; class telemed_use; strata telemed_use; var Hospital_free_days4 ; domain _imputation_ ; ods output domain = outex1 ; run; proc mianalyze data=outex1; by Hospital_free_days4 telemed_use;*this would be the TABLES variable; modeleffects median; run;
@UcheOkoro wrote:
Hello,
Please, I need help calculating the weighted median and confidence interval of for hospital_free_days by telemed_use across 5 imputations.
The proc surveymeans is ignoring the class statement and also refusing to create the ods output domain = outex1 ;
Please, I also need help with the right Proc MI analyze code.
I am using the following SAS code.
Thank you.
proc surveymeans data=Avera_matched_data q1 q3 median; class telemed_use; strata telemed_use; var Hospital_free_days4 ; domain _imputation_ ; ods output domain = outex1 ; run; proc mianalyze data=outex1; by Hospital_free_days4 telemed_use;*this would be the TABLES variable; modeleffects median; run;
When code "is ignoring the class statement and also refusing to create the ods output domain = outex1 " or other unexpected behavior the first thing you should do is read the LOG. If you don't understand what the log means, then copy the entire log for the procedure or data step including all code and messages, notes, warnings and/or errors, open a text box on the forum using the </> icon at the top of the message window, and paste the text.
The text box is important because the message windows on the forum will reformat text and render many of the diagnostic bits that SAS provides in the log less useful.
Hello Ballardw,
Thank you for you response.
The following is the log. I looked through my code but could not figure out what the problem is.
6266 6267 proc surveymeans data=Avera_matched_data q1 q3 median; 6268 class telemed_use; 6269 strata telemed_use; 6270 var Hospital_free_days4 ; 6271 domain _imputation_ ; 6272 ods output domain = outex1 ; 6273 run; WARNING: Output 'domain' 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 SURVEYMEANS used (Total process time): real time 9.77 seconds cpu time 0.26 seconds
Please run this code and share the result.
Proc Freq data=Avera_matched_data; tables _imputation_ ; run;
There are times when the various survey procedures do not "like" having the same variable on the STRATA statement and used in another role. You may need to add another variable with the same values as the STRATA variable to use as the Class variable.
Obviously don't have your data to test that last possibility.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.