fa_estimate() and fa_indicator() return data frames of class
fa_estimate, and fa_link() one of class fa_link. They print as a
formatted table (the one fa_table() builds), summary() counts the
estimates in each INEI quality band, and plot() draws each estimate
with its confidence interval, coloured by quality. They are still data
frames; as.data.frame() drops the class.
Argumentos
- x, object
A table from
fa_estimate(),fa_indicator()orfa_link().- n
Rows to show.
- percent
Show proportions as percentages.
- ...
Passed on to
print.data.frame()orgraphics::plot().- main
Plot title; by default the variable or indicator.
Valor
print() and plot() return x invisibly. summary() returns a
data frame with one row per quality band: quality, n and the share
of estimates.
Ejemplos
library(survey)
#> Cargando paquete requerido: grid
#> Cargando paquete requerido: Matrix
#> Cargando paquete requerido: survival
#>
#> Adjuntando el paquete: ‘survey’
#> The following object is masked from ‘package:graphics’:
#>
#> dotchart
data(api, package = "survey")
d <- svydesign(~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
d$variables$high <- d$variables$api00 > 700
e <- fa_estimate(d, "high", type = "prop", by = "stype")
e
#> <faperu estimate: prop of `high` by stype, 3 rows>
#> Area Estimate 95% CI CV (%) n Quality
#> E 36.1* 20.7 - 51.5 21.7 144 referencial
#> H 28.6* 0.0 - 61.7 59.2 14 referencial
#> M 24.0* 1.2 - 46.8 48.5 25 referencial
#> * CV above 15% or fewer than 30 cases: a reference only (INEI 'referencial').
summary(e)
#> quality n share
#> 1 muy buena 0 0
#> 2 buena 0 0
#> 3 aceptable 0 0
#> 4 referencial 3 1
plot(e)
