margin_quantile | R Documentation |
Estimates quantiles (of level probs) of y for groups A and B (marginals) and the number of observations.
margin_quantile(...)
## Default S3 method:
margin_quantile(
.reweight_strata_all,
y = NULL,
weights = NULL,
probs = 0.5,
...
)
## S3 method for class 'reweighted'
margin_quantile(.reweighted, ...)
... |
arguments passed to or from other methods. |
.reweight_strata_all |
output of |
y |
name of the outcome variable for which you want to make the decomposition. If NULL (default), the value is inherited from the attributes of |
weights |
name of the weight variable (sample weights). If NULL (default), the value is inherited from the attributes of |
probs |
numeric vector of length one with the desired quantile level (should be between 0 and 1). |
.reweighted |
an object of class |
a data frame with two rows (one for each group) and the follwing four columns:
the name of the treatment column used in reweight_strata_all2
;
yhat
: quantile of the y variable;
Nhat
: estimate of the number of individuals;
probs
: level of the estimated quantile (between 0 and 1).
data(invented_wages)
r00 <- reweight_strata_all2(invented_wages, treatment = "gender",
variables = c("sector", "education"),
y = "wage", weights = "sample_weights")
margin_quantile(r00, probs = 0.75)
data(invented_wages)
r00 <- reweight_strata_all4(invented_wages, treatment = "gender",
variables = c("sector", "education"),
y = "wage", weights = "sample_weights")
str(r00)
names(r00)
class(r00)
margin_quantile(r00)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.