[R] Generating nested models for order selection tests

Ready Learner
Fri, 24 May 2019 08:43:25 -0000

Hello everyone,

I have created a parametric additive model for the median house price (as
the response) and with the number of tax forms (x1) and the number of
healthcare facilities (x2) as my covariates. I should mention that both of
the covariates have quadratic effects in my model.

Now I want to do a hypothesis testing. I am taking the mentioned parametric
model as my null state (hypothesis) and I want to use "order selection
test" to test it against a nonparametric alternative hypothesis. Based on
what I understood from few related articles I have read, I should create a
sequence of nested models. I am thinking about using polynomial or cosine
functions as my basis function. In either case, I have to create a series
of models (i.e. the sequence of nested models via series expansion) based
on the basis function to test the hypothesis.
Is there any way to do this automatically in R?

Kind regards,
readyToLearn