QRP
 
Loading...
Searching...
No Matches
ms_psdistribution.sas File Reference

This macro categories propensity scores into bins in order to plot a histogram. More...

Detailed Description

This macro categories propensity scores into bins in order to plot a histogram.

  • Define default values for categorizing PS (41 total bins, each 0.025 points wide)
  • assign PS to a category and assign a weight if specified
  • Compute sum of weights/episodes in each PS category
  • Create squared table in the case that the input dataset doesn't contain a PS in each category
  • Create final table by merging the computed sum of episodes in each category with the squared table
Program inputs
  • DATA dataset: Input dataset that at minimum contains a 0/1 variable named 'exposure' which differentiates exposure and reference, a variable holding a PS score, and optional variable with a weight
Program outputs
  • OUTDATA dataset: Output dataset with 3 variables: 1)exposure, 2) ps_cat, and 3) episodes (representing # of episodes in the ps_cat

Usage

%ms_psdistribution(data=adjusted, psvar=pscore, weightvar=iptw, outdata=psdistribution);
Parameters
Parameters
[in]DATAInput file with propensity scores.
[in]PSVARName of variable in DATA used to identify the propensity score.
[in]WEIGHTVAROptional Name of variable in DATA used to apply a weight.
[in]OUTDATAOutput file with # of episodes in each PS category.

SAS Macros Dependencies

None.

Author
Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)