BookmarkSubscribeRSS Feed
dbwindyxiaosi
Calcite | Level 5

So my data have 2050 cases, group 1 (treatment) =1050, group 2(control)  =1000. 

Per data per row; varA, varB, varC are categorical, age, bmi are continous.

outcome is the death (yes/no).

I use IPTW to remove the confounding.

 

1. create the ps_weight: 

PROC PSMATCH data= mydata region=allobs;

class varA varB varC 

psmodel group(treatment="1")=varA varB varC age bmi;

assess lps var=(varA varB varC age bmi) /weight=atewgt(stabilize=yes);

output out(obs=all)=dataweight   atewgt(stabilize=YES)=ps_weight;

 

no question, I had ps_weight for everyone. AND THE STANDARDIZED MEAN DIFFERENCE WAS <0.10

 

 

 

2. I saw literature they shows the baseline variables between group 1 and 2, using chi square test

I want to compare varA, varB, varC between group 1 and 2 as well after the IPTW.

 

my code for varA: 

proc freq data =dataweight;
weight ps_weight;
table varA *group/chisq all;
run;

 

what I got is the sample size larger than original; now the freq output shows I have 2060 cases (original 2050), smothing like this

 

Group1

Group2

VarA=0

58

102

VarA=1

1000

900

total

1058

1002

 

so does the total sample size for varB, and varC.

 

Is it right that you could get the IPTW pseudo population larger than original in the proc freq procedure???

 

3. For continous varaibles, bmi, age, what test I should use considering the IPTW? they are not normally distributed.

how to apply the IPTW on the rank sum test ??

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 1322 views
  • 0 likes
  • 1 in conversation