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
"too many base levels specified" after -suest-Dear all, I am getting the error "too many base levels specified" when running the following lines:…
Foreach and estimatesDear Stata users, I am coming with several questions concerning looping. Let's imagine I have 4 du…
stratum effect in Generalized linear modelsHello everyone, I am working with DHS database and after setting the data with these commands: ege…
xtscc error: "too many values r(134)";Hi, I am currently trying to estimate a Dynamic Panel Data Model (including a first-order lag of the…
How to remove the first observation with a certain value and observations that occurred before that dateHello, I have a long dataset that includes many visits (oftentimes many visits within one person) a…
Subscribe to:
Post Comments (Atom)
0 Response to Predict,xb
Post a Comment