npse: Nonparametric Power Series Estimation

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

Description

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

Usage

1
npse(formula, order = 3, m = 10, seed = NULL)

Arguments

formula

specification of the outcome model in the form like either z ~ x1 + x2 or z ~ X where X is the covariate matrix.

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.

Details

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.

Value

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 z and the optimal covariates power series.

CV.Res

The residual sum of squares of the cross-validations.

seed

The random seed.

Author(s)

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.

References

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

See Also

larf, larf.fit

Examples

 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 2, 2019, 3:27 p.m.

Related to npse in LARF...