If I split the data into training and test group, can I use npregress to predict the mean value in the test group? In other words, can I use npregress to predict y at some given x? For example,
sysuse auto, clear
set seed 123
gen u=runiform()
npregress kernel price weight length foreign mpg rep78 headroom trunk turn displacement gear_ratio if u<=0.75, kern(gau)
predict ye
su ye if u>0.75
It seems that no y in the test group were predicted.
0 Response to Can npregress be used to predict mean value of y at given x
Post a Comment