powered by
Estimate parameters of a linear model by matching the moments of kernel density estimators.
mmKDEshort(formula, data = list(), xin, type, ...)
An LHS ~ RHS formula, specifying the linear model to be estimated.
A data.frame which contains the variables in formula.
formula
Numeric vector of length equal to the number of independent variables, of initial values, for the parameters to be estimated.
An integer specifying the bandwidth selection method used, see bw.
bw
Arguments to be passed on to the control argument of the optim function.
optim
mmKDEshort: A list with the following components:
coefficients: A vector of estimated coefficients.
error: The value of the objective function.
A shortened version of mmKDE.
mmKDE
# NOT RUN { x <- 1:10 y <- x+rnorm(10) XIn <- lm(y~x) mmKDEshort(y~x, xin=coef(XIn), type=-1) # }
Run the code above in your browser using DataLab