densfun | R Documentation |
computes the derivative of a function in a point using kernel estimation
densfun(formula, design, x, h = NULL, FUN = "F", na.rm = FALSE, ...)
formula |
a formula specifying the income variable |
design |
a design object of class |
x |
the point where the derivative is calculated |
h |
value of the bandwidth based on the whole sample |
FUN |
if |
na.rm |
Should cases with missing values be dropped? |
... |
future expansion |
the value of the derivative at x
Djalma Pessoa and Anthony Damico
library(laeken)
data(eusilc) ; names( eusilc ) <- tolower( names( eusilc ) )
library(survey)
des_eusilc <- svydesign(ids = ~rb030, strata =~db040, weights = ~rb050, data = eusilc)
des_eusilc <- convey_prep( des_eusilc )
densfun (~eqincome, design=des_eusilc, 10000, FUN="F" )
# linearized design using a variable with missings
densfun ( ~ py010n , design = des_eusilc, 10000, FUN="F" )
densfun ( ~ py010n , design = des_eusilc , 10000,FUN="F", na.rm = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.