plmm: Partially Linear Mixed Effects Model

Description Usage Arguments Details Value See Also Examples

View source: R/plmm.R

Description

Fit a partially linear mixed effects model under homoskedastic regression error assumption. plmm returns an object of the ‘plmm’ class.

Usage

1
2
3
plmm(formula, random, h0, data, vc.method = "FC", nonpar.bws = "h.select", 
poly.index = 1, iter = 20, scale.h = 1, epsilon = 0.003, lim.binning = 100, 
hetero.prop = NULL, ...)

Arguments

formula

a symbolic description of the model to be fitted under homoskedastic regression error assumption. 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 ‘|’).

random

the name of the clustering factor variable. The levels of the factor can be either numeric or character.

h0

a set of bandwidths for nonparametric kernel regression to reduce the model. h0 can be obtained using select.h0. h0 is optional; if omitted, select.h0 is called automatically to compute a set of bandwidths. The user can modify bandwidths in a list object created by select.h0 and pass the object to plmm.

data

an optional data frame containing the variables in the model. If relevant variables are not found in data, the variables are taken from the environment plmm was called from.

vc.method

the method for variance components estimation: either the default “FC” (fitting of constant) or “SA” (Swamy-Arora). If heteroskedasticity proportionalities are known, “FChetero” (heteroskedastic fitting of constant) and “SAhetero” (heteroskedastic Swamy-Arora) can be used with hetero.prop specified.

nonpar.bws

the bandwidth selection method for the kernel regression of the nonparametric component. “h.select” (default), “hcv”, “GCV” and “GCV.c” are available.

poly.index

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

iter

the maximum number of iterations to be performed. The default is 20.

scale.h

a scalar or 2-dimensional vector to scale the bandwidths selected for kernel regression of the nonparametric component. The default is 1. When a scalar is given for a nonparametric component of two covariates, it scales the bandwidths in both directions by the same factor.

epsilon

The criterion to determine the convergence of model fitting. The default value is 0.003.

lim.binning

the smallest sample size below which binning techniques are not used to calculate the degrees of freedom of the estimated nonparametric component (the ordinary cross-validation is used instead). This option doesn't apply if “GCV.c” is used for nonpar.bws.

hetero.prop

a vector of heteroskedasticity proportionalities. The length of the vector should be the same as either the sample size (within-cluster heteroskedasticity) or the number of the clusters (between-cluster heteroskedasticity).

...

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

Details

The number of covariates of the nonparametric component is at most two. Kernel regression is estimated using sm.regression. There are four methods for bandwidth selection: “h.select” calls h.select to execute cross validation (CV) using binning techniques; “hcv” calls hcv which implements the ordinary CV; “GCV” uses the generalized CV; and “GCV.c” performs generalized CV for correlated data. sm.regression, h.select and hcv are functions of the sm package. When the nonparametric component is a function of two variables, optimization procedure selects one bandwidth that, multiplied by the standard deviations of those variables, minimizes the cross validation statistic. The user can further scale the bandwidths using scale.h. epsilon is the value to determine the convergence of iterative estimation. For the rth iteration round, the absolute value of (σ^{2}_{(r)}-σ^{2}_{(r-1)})/σ^{2}_{(r-1)} is calculated for each variance component. The iteration procedure ends when this absolute value of both variance components becomes smaller than epsilon.

Value

coefficients

estimated regression coefficients.

fitted.values

conditional predictions of the response, defined as the sum of the estimated fixed components and the predicted random intercepts.

residuals

residuals of the fitted model, defined as the response values minus the conditional predictions of the response.

var.comp

variance component estimates.

nonpar.values

estimated function values of the nonparametric component at the data points.

h.nonpar

the bandwidths used to estimate the nonparametric component in the final iteration.

rank

the degrees of freedom of the parametric component, which doesn't include the intercept term.

df.residual

the residual degrees of freedom defined as N-p-tr(2S-S^T) where N is the sample size, p is the rank of the parametric component, and S is the smoother matrix for the nonparametric component. If “GCV.c” is used for nonpar.bws, an alternative definition N-p-tr(2SR-SRS^T) is applied with R being the estimated correlation matrix of the data.

nbins

the number of bins (which would have been) used for binning for cross validation and the calculation of the degrees of freedom.

iter

the number of iterations performed.

coef.iter

regression coefficient estimates computed in the iteration process.

vc.iter

variance component estimates computed in the iteration process.

formula

formula passed to plmm.

call

the matched call to plmm.

h0.call

the matched call to select.h0.

xlevels

if there are factors among the covariates in the parametric component, the levels of those factors.

See Also

select.h0, h.select, hcv, sm.options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(plmm.data)
plmm(y0~x1+x2+x3|t1, random=cluster, data=plmm.data)

# heteroskedasticity proportionality x3
plmm(y1~x1+x2+x3|t1, random=cluster, data=plmm.data, vc.method="FChetero", hetero.prop=x3)

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

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