Hi all,
I am trying to run the following command to predict yhat and I am only getting missing values for yhat. Please help
the code I am running is
probit c $N $Z , r
foreach z of global Z {
gen copy_`z'=`z'
qui sum `z'
replace `z' = r(mean)
}
predict yhat,xb
the data looks like this after usign the mean for the global Z :
input byte c float(age mh)
0 25 68.35207
0 25 68.35207
0 25 68.35207
0 24 68.35207
0 22 68.35207
0 24 68.35207
0 23 68.35207
0 22 68.35207
0 25 68.35207
0 22 68.35207
0 24 68.35207
0 26 68.35207
0 22 68.35207
0 25 68.35207
0 26 68.35207
0 24 68.35207
0 26 68.35207
0 25 68.35207
0 24 68.35207
0 24 68.35207
0 25 68.35207
0 27 68.35207
0 22 68.35207
0 24 68.35207
0 26 68.35207
0 26 68.35207
0 24 68.35207
0 26 68.35207
0 22 68.35207
0 24 68.35207
0 24 68.35207
0 25 68.35207
0 24 68.35207
0 24 68.35207
0 22 68.35207
0 25 68.35207
0 25 68.35207
0 26 68.35207
0 26 68.35207
0 26 68.35207
0 24 68.35207
0 24 68.35207
0 24 68.35207
0 24 68.35207
0 26 68.35207
0 26 68.35207
0 22 68.35207
0 25 68.35207
0 24 68.35207
0 26 68.35207
0 26 68.35207
0 23 68.35207
0 22 68.35207
0 22 68.35207
0 24 68.35207
0 22 68.35207
0 26 68.35207
0 25 68.35207
0 22 68.35207
0 25 68.35207
0 25 68.35207
0 24 68.35207
0 26 68.35207
0 26 68.35207
0 25 68.35207
0 24 68.35207
0 26 68.35207
0 22 68.35207
0 26 68.35207
0 24 68.35207
0 23 68.35207
0 22 68.35207
0 24 68.35207
0 23 68.35207
0 26 68.35207
0 26 68.35207
0 25 68.35207
0 23 68.35207
0 26 68.35207
0 23 68.35207
0 23 68.35207
0 23 68.35207
0 26 68.35207
0 26 68.35207
0 24 68.35207
0 25 68.35207
0 26 68.35207
0 26 68.35207
0 26 68.35207
0 23 68.35207
0 26 68.35207
0 22 68.35207
0 27 68.35207
0 26 68.35207
0 25 68.35207
0 24 68.35207
0 24 68.35207
0 22 68.35207
0 24 68.35207
0 22 68.35207
end
Any help is appreciated. Thanks
I think it is because of overdispersion in c but i may be wrong. Thanks.
Kind Regards,
Aarushi
Related Posts with Predict,xb
Error in cmp: "discontinuous region encountered cannot compute an improvement"Hi all, I am trying to run a cmp model between three binary variables: new_bf23, new_bf3 and z, whe…
XTIVREG, FE: needs to be FE in stage 1 and 2?Hi all, I'm running a fixed effects regression using an IV variable, but I'm wondering, do I need t…
Logit, Probit and Penalised Maximum Likelihood (PMLE)Hi all, Just wondering as to why the sample sizes are different when I run Logit/probit and PMLE re…
Generalized difference in differences with panel dataHi, I am relatively new to Stata so any help would be greatly appreciated! Q: How do I do a general…
Trimming certain part of variable labelsI am trying to remove the "R10 D Covid-19 Sp" part from all the variables. I used the Code: cleanch…
Subscribe to:
Post Comments (Atom)
0 Response to Predict,xb
Post a Comment