Hello everyone, I have a question about the commands “psmatch2” and “pstest”.
For propensity score matching, the result that I get with Stata version 17 is different from what is shown on a video using Stata version 14.
I summarize the whole process here ( I copied the log file into this rtf file [Array ] ):
-I have a data set of medical records;
-There are 4 variables in the dataset:
age
male
var1
outcomevar
-I generated a matching variable based on var1.
gen matchvar=0
replace matchvar =1 if var1 >14.0
-Then I used psmatch2 and paired the data.
psmatch2 matchvar age male, outcome(outcomevar) caliper(.001) noreplace neighbor(1)logit
gen pair = _id if _treated==0
replace pair = _n1 if _treated==1.
bysort pair: egen paircount = count(pair)
drop if paircount !=2
-Up to this point everything is as it is supposed to be.
-Then I used “pstest“
pstest age male var1 outcomevar
-pstest command without var1 included, works well. But if I include var1 it gives a r(2000) error.
-These are the important pieces of information:
1. var1 (a continuous variable) is the variable that we used for generating the matching variable.
2. In stata version 17, the command < pstest.. var1…> has no output just headings of the table and r(2000) error. [the result is on log file]
3. In stata version 14, the command <pstest …var1…> generate “the variable, mean and bias table” and “the summary of the distribution of the bias table” and a r(2000) error [ I can send a screenshot from the video]
4. command <pstest2 …var1…> works perfectly in stata version 17.
I checked the ado-file of pstest and pstest2, however, I couldn’t find the reason.
I would appreciate it if you could shed some light on it.
Related Posts with “psmatch2” and “pstest”: different results in version 14 and 17
Matrix with specific outputI am trying to write a code that shows me the results of 1000 replications (I want to do a placebo t…
What does the ivprobit command actually do?Dear statalisters, I've read dozens of times the ivprobit manual and searched for papers published o…
Latent Class analyses and repeated measures (GLLAMM) - VERSION STATA 15.1 ID TIME_POINT A B C 1 0 5 10 10 1 1 25 25 25 1 2 50 50 25 2 0 50 25 25 2 1 25 75 75 2…
Tests to justify use of quantile regressionHi all. Can you suggest any formal statistical test/analysis in order to justify the application of …
Correlation between the trajectoy ovr time of two variablesHello, I hope you can guide me. I am working with panel data, the data is daily data for 90 days ne…
Subscribe to:
Post Comments (Atom)
0 Response to “psmatch2” and “pstest”: different results in version 14 and 17
Post a Comment