Description Usage Arguments Details Value Note Author(s) See Also

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.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.