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.
Related Posts with Can npregress be used to predict mean value of y at given x
Should I rename all the variables with the year immediately following the original variable names when I merge data across years with loopI run the following code: local i = 1998 while `i' < 2007{ local j=`i'+1 **step 10: match by …
Creating a variable with three condtionsI am using a data set of 50 countries which are separated into four regions. I want to create a vari…
Error Using the Command 'using'Hello everyone, I just downloaded data from PSID. Every time I run the do.file that comes with the …
Heckman selection model in three stagesDear Statalist, I hope you are well. Please, I would like to ask regarding the Heckman selection mod…
Tokenize and looping through tokensHi Statlist, I have the following problem. I have defined 3 local variables defining the path to so…
Subscribe to:
Post Comments (Atom)
0 Response to Can npregress be used to predict mean value of y at given x
Post a Comment