lpdensity_fn | R Documentation |
lpdensity
lpdensity_fn
implements the local polynomial density estimator. This
function is for internal use, and there is no error handling or robustness check.
lpdensity_fn(
data,
grid,
bw,
p,
q,
v,
kernel,
Cweights,
Pweights,
massPoints,
showSE = TRUE
)
data |
Numeric vector or one dimensional matrix/data frame, the raw data. |
grid |
Numeric vector or one dimensional matrix/data frame, the grid on which density is estimated. |
bw |
Numeric vector or one dimensional matrix/data frame, the bandwidth
used for estimation. Should be strictly positive, and have the same length as
|
p |
Integer, nonnegative, the order of the local-polynomial used to construct point estimates. |
q |
Integer, nonnegative, the order of the local-polynomial used to construct confidence interval (a.k.a. the bias correction order). |
v |
Integer, nonnegative, the derivative of distribution function to be estimated. |
kernel |
String, the kernel function, should be one of |
Cweights |
Numeric vector or one dimensional matrix/data frame, the weights used for counterfactual distribution construction. Should have the same length as sample size. |
Pweights |
Numeric vector or one dimensional matrix/data frame, the weights used in sampling. Should have the same length as sample size, and nonnegative. |
massPoints |
Boolean, whether whether point estimates and standard errors should be corrected if there are mass points in the data. |
showSE |
|
Recommend: use lpdensity
.
grid |
grid points. |
bw |
bandwidth for each grid point. |
nh |
Effective sample size for each grid point. |
f_p |
Density estimates on the grid with local polynomial of order |
f_q |
Density estimates on the grid with local polynomial of order |
se_p |
Standard errors corresponding to |
se_q |
Standard errors corresponding to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.