Hi I'm practicing using propensity scores and propensity score matching on dummy date before using it on my real data.
However when I come to use pscore, the following error comes up, could you let me know why ? I checked and the data is binary 0 and 1.
//Estimation of the propensity score
outcome = msmoke > 0 predicts data perfectly
r(2000);
end of do-file
with regards to data:
I used this data:
webuse cattaneo2
drop mmarried mhisp fhisp foreign alcohol deadkids fage fedu nprenatal monthslb mrace frace prenatal birthmonth lbweight fbaby prenatal1
Therefore remaining with the following variables:
bweight mage medu order msmoke mbsmoke
//Creating macros
global treatment mbsmoke //intervention/treatment
. global ylist bweight //outcome
. global xlist mage medu msmoke //variables to match on t
//Creating a regression but now controlling for cofounding
. reg $ylist $treatment $xlist
//Creating a regression but now controlling for cofounding
. reg $ylist $treatment $xlist
MY problem lies here:
//Estimate propensity scores
. pscore $treatment $xlist,pscore(myscore)blockid(myblock)comsup
However when I come to use pscore, the following error comes up, could you let me know why ? I checked and the data is binary 0 and 1.
//Estimation of the propensity score
outcome = msmoke > 0 predicts data perfectly
r(2000);
end of do-file
with regards to data:
I used this data:
webuse cattaneo2
drop mmarried mhisp fhisp foreign alcohol deadkids fage fedu nprenatal monthslb mrace frace prenatal birthmonth lbweight fbaby prenatal1
Therefore remaining with the following variables:
bweight mage medu order msmoke mbsmoke
//Creating macros
global treatment mbsmoke //intervention/treatment
. global ylist bweight //outcome
. global xlist mage medu msmoke //variables to match on t
//Creating a regression but now controlling for cofounding
. reg $ylist $treatment $xlist
//Creating a regression but now controlling for cofounding
. reg $ylist $treatment $xlist
MY problem lies here:
//Estimate propensity scores
. pscore $treatment $xlist,pscore(myscore)blockid(myblock)comsup
Comment