select.h0: Bandwidths Selection for Model Reduction

Description Usage Arguments Details Value See Also Examples

View source: R/select.h0.R

Description

Select the bandwidths for kernel regression to reduce the partially linear mixed effects model to a mixed effects model.

Usage

1
select.h0(formula, data, nonpar.bws = "h.select", poly.index = 1, ...)

Arguments

formula

a symbolic description of the model to fit with the model fitting function plmm. formula consists of three parts: the response (the left hand side of ‘~’), the fixed parametric component (between ‘~’ and ‘|’), and the fixed nonparametric component (the right hand side of ‘|’).

data

an optional data frame containing the variables in the formula. If relevant variables are not found in data, they are taken from the environment from which select_h0 was called.

nonpar.bws

the cross validation method for bandwidth selection. The method is either the default “h.select” (cross validation using binning technique) or “hcv” (ordinary cross validation).

poly.index

the degree of polynomial of the kernel regression: either 0 for local constant or 1 (default) for local linear.

...

optional arguments relevant to h.select or hcv, which include nbins, hstart and hend. See sm.options and hcv.

Details

select.h0 yields a list object that can be used for the argument h0 in the model fitting function plmm. Bandwidths are selected for kernel regression of the response and the covariates in the fixed parametric component. “h.select” uses binning techniques for cross validation. The number of bins for binning is set to the default integer, the rounded value of 8*log(N)/d), where N is the sample size and d is the number of covariates in the nonparametric component. When the sample size is small (N < 100), binning techniques are not used and the bandwidths selected will coincide with those obtained with “hcv”.

Value

h0

a vector (if the nonparametric component is a function of one variable) or a matrix (if it is a function of two variables) of bandwidths selected.

nbins

the number of bins (which would be) used for binning.

h0.call

the matched call to select.h0.

See Also

plmm, h.select, hcv.

Examples

1
2
3
4
5
6
7
data(plmm.data)
select.h0(y0~x1+x2+x3|t1, data=plmm.data)

# nonparametric component of two covariates, t1 and t2
## Not run: 
select.h0(y2~x1+x2+x3|t1+t2, data=plmm.data) 
## End(Not run)

plmm documentation built on May 2, 2019, 7:29 a.m.