07-17-2024
Jay_95
Calcite | Level 5
Member since
07-16-2024
- 4 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by Jay_95
Subject Views Posted 705 07-17-2024 04:18 PM 766 07-17-2024 11:36 AM 888 07-16-2024 06:53 PM 920 07-16-2024 04:47 PM -
Activity Feed for Jay_95
- Posted Re: macro for multiple outcome-exposure pairs in surveyreg on Statistical Procedures. 07-17-2024 04:18 PM
- Posted Re: macro for multiple outcome-exposure pairs in surveyreg on Statistical Procedures. 07-17-2024 11:36 AM
- Posted Re: macro for multiple outcome-exposure pairs in surveyreg on Statistical Procedures. 07-16-2024 06:53 PM
- Posted macro for multiple outcome-exposure pairs in surveyreg on Statistical Procedures. 07-16-2024 04:47 PM
07-17-2024
04:18 PM
Again, codes works as expected. Again, thank you for your help.
... View more
07-17-2024
11:36 AM
This runs perfectly and your explanations are really helpful. I greatly appreciate your assistance
... View more
07-16-2024
06:53 PM
Thank you for the guidance. For example, this code works with the data: proc surveyreg data=lib_sup.data_sup; weight var1; cluster var2; strata var3; class ex1; model oc_a = var4 var5 var6 ex1; lsMEANS ex1k; oc_a is the outcome ex1 is the exposure of interest needing ls mean estimates Obviously “&exposure&k” and “&outcome&I” are not correctly stated. I would like to have the next variable in the list indicated in the model. I am in over my head and appreciate the help. Here is the current error: NOTE 137-205: Line generated by the invoked macro "SUP4". 1 proc surveyreg data=lib_sup.data_sup; weight var1; cluster var2; strata var3; class 1 ! &exposure&k; model &outcome&I.= var4 var5 var6 &exposure&k.; lsMEANS &exposure&k; 22 ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, *, -, /, :, @, _CHARACTER_, _CHAR_, _NUMERIC_, |.
... View more
07-16-2024
04:47 PM
The proc surveyreg works but I am trying to avoid typos and wanted a macro that would run multiple regression models using cycling through each outcome - exposure pair. Specifically, I need the ls mean estimations. The exposures are not mutually exclusive. This is similar to some other questions but need some help with errors, the model is not specified correctly. %macro sup4(outcome, exposure); %do i=1 %to 9; %do k=1 %to 7; proc surveyreg data=lib_sup.data_sup; weight var1; cluster var2; strata var3; class &exposure&k; model &outcome&i = var4 var5 var6 &exposure&k; lsMEANS &exposure&k; %end; %end; %mend; %let index = oc_a oc_b oc_c oc_d oc_e oc_f oc_g oc_h oc_i ; %let exposure = ex1 ex2 ex3 ex4 ex5 ex6 ex7; %sup4 ; It would also be great to get help with creating a table of the ls means output indicating the corresponding outcome and exposure pair. Many thanks.
... View more