Description Usage Arguments Details Value Author(s) References See Also Examples

Use the optimal order of power series of covariates to predict outcome. The optimal order of power series is determined by cross-validation.

1 |

`formula` |
specification of the outcome model in the form like either |

`order` |
the maximal order of power series to be used. |

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

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

This function predicts the outcome based on the optimal order of covariates power series. The optimal order of the power series is determined by cross-validation. For example, it can be used to predict the probabilty of receiving treatment inducment based on covariates.

`fitted` |
Predicted outcomes based on the estimated model. They are probabilities when the outcome is binary. |

`Lambda` |
The optimal order of power series determined by cross-validation. |

`Data.opt` |
The data including |

`CV.Res` |
The residual sum of squares of the cross-validations. |

`seed` |
The random seed. |

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.

Abadie, Alberto. 2003. "Semiparametric Instrumental Variable Estimation of Treatment Response Models." *Journal of Econometrics* 113: 231-263.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
data(c401k)
attach(c401k)
## Not run:
# binary outcome
Z <- c401k$e401k
# covariates
X <- as.matrix(c401k[,c("inc", "male", "fsize" )])
# get nonparametric power series estimation of the regression of Z on X
zp <- npse(Z~X, order = 5, m = 10, seed = 681)
# sum of residual squares of the cross-validations
zp$CV.Res
# the opitimal order of the power series
zp$Lambda
# summary of the predictions based on the optimal power series
summary(zp$fitted)
## End(Not run)
``` |

LARF documentation built on May 30, 2017, 6:41 a.m.

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.