- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You say that
The two data sets do not have common individuals or variables.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you don't have (or don't want to use) the raw data, and only have summary data, some coding is required. More here:
https://www.lexjansen.com/nesug/nesug06/an/da24.pdf
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Instead of merging the two data
(Perhaps you mean "instead of appending the two data")
This is a restriction which makes the programming much harder and ought to be eliminated. You (or your company or university) is paying for all the work already done by SAS to compare means and percents, plus SAS has tested it, fixed bugs and proved that these work in millions of real world applications — don't try to do this yourself.
Use the RAW data. Append the two data sets. This makes everything you do much simpler. Compare the means by PROC TTEST or PROC MEANS (or SURVEYMEANS). Compare the percents by using PROC FREQ (or SURVEYFREQ).
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If there are only two group, compare MEAN of two group by PROC TTEST or PROC N1PARM + willconx.
compare PROPORTION(a.k.a risk ratio) of two group by
PROC FREQ ;
TABLE group*gender/relrisk ;
run;
@Rick_SAS wrote bolgs about these before.