Dear Statalist

I am trying to figure out to understand what -teffects ipwra- actually does.

I understand that -teffects ra-

Code:
webuse cattaneo2, clear

// Regression adjustment
teffects ra (bweight mmarried prenatal1 fbaby medu) (mbsmoke)
does the following

Code:
// -teffects ra- using -regress-
qui regress bweight mbsmoke##(mmarried prenatal1 fbaby c.medu)
margins r.mbsmoke
and -teffects ipw-

Code:
// Inverse probability of treatment weighting
teffects ipw (bweight) (mbsmoke mmarried prenatal1 fbaby medu, logit)
does this:

Code:
// -teffects ipw- using -regress-
logit mbsmoke mmarried prenatal1 fbaby medu
predict probab
generate w = 1/probab       if mbsmoke == 1
replace  w = 1/(1 - probab) if mbsmoke == 0
regress bweight mbsmoke [pw = w]
I would now assume that -teffects ipwra- does a combination of the two,
but whatever I tried with -regress- didn't lead me to the -teffects ipwra-
result (and I didn't find/understand the page in the documentation explaining
what -teffects ipwra- actually does).

Can anybody help?

Thanks for your consideration
KS