[R] Cross validation multivariate kernel regression
|ordpreet@m @end|ng |rom gm@||@com
Mon Nov 18 20:58:48 CET 2019
This question is general- I have a data set of n observations, consisting
of a single response variable y and p regressor variables.( n ~50, p~3 or
I am planning to implement Nadaraya-Watson regression model, with
bandwidths optimized via cross-validation.
For cross-validation, I will need to choose 10 outsample/test data sets of
a given size ( =n/10 ) for each choice of the bandwidth vector, and then
choose the optimum bandwidth vector (in terms of MSE or any reasonable loss
function-we can take it to be MSE, as example).
The difficulty is I can't find any code to do this under:
A) multiple regressors (p>1) AND
B) I'll get to choose to the outsample datasets.
Thanks for any help/insight you can provide.
[[alternative HTML version deleted]]
More information about the R-help