Provides cross-validation of a linear regression model

1 |

`form.lm` |
formula of the regression model. |

`data` |
data including outcome and covaraites. |

`m` |
the number of folds to be used in cross-validation. |

`seed` |
random starting number used to replicate cross-validation. |

This function finds the optimal order of the covariates power series through cross-validation.

`sumres` |
Sum of residual squares divided by degree of freedom. |

`df` |
Degree of freedom which equals to the number of valid predictions minus the number of parameters. |

`m` |
the number of folds to be used in cross-validation. |

`seed` |
The random seed. |

In making the code, we adopted part of the `CVlm`

in `DAAG`

(Maindonald and Braun, 2015).

https://cran.r-project.org/package=DAAG

Weihua An, Departments of Sociology and Statistics, Indiana University Bloomington, weihuaan@indiana.edu.

Xuefu Wang, Department of Statistics, Indiana University Bloomington, wangxuef@umail.iu.edu.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.