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
Custom STS graph axis with spacingHi, This is my first post on STATALIST I am trying to create a custom y axis scale using Sts graph…
RDRobust QuestionHi all, I am trying to use a fuzzy regression discontinuity strategy in some data work of mine. I h…
Is there a command for Black Scholes model for American options?I realise there is Code: bsopm for European Option, but I wonder, is there a command for American d…
Table from string and numeric variablesHello, this is a general question about the best approach. I am using stata 16.1 I want to make a t…
Stata tables to word format by writing matrix commandHi. I am using a dataset that has 3 years. I am using the command tabulate to do analysis. So I am w…
Subscribe to:
Post Comments (Atom)
0 Response to Predict,xb
Post a Comment