confint.acs: Return upper and lower bounds of given confidence intervals...

Description Usage Arguments Value Author(s) Examples

Description

When passed an acs object, confint will return a list of two-column dataframes (one dataframe for each variable specified in parm) including lower and upper bounds for given confidence intervals. Intervals can be one- or two-sided.

Usage

1
2
## S3 method for class 'acs'
confint(object, parm = "all", level = 0.95, alternative = "two.sided", ...)

Arguments

object

a acs object (or subset).

parm

which variables/columns to return confidence intervals for; defaults to "all", which computes confidence intervals for all estimates in the acs object.

level

the confidence level required – e.g., .95 = 95% confidence.

alternative

whether the interval should be one-sided (i.e., one-tailed – "greater" or "less" – extending to Inf (or -Inf) on one side) or "two-sided".

...

additional argument(s) for methods.

Value

Returns a list of dataframes (one for each variable specified in parm) of the lower and upper bounds of the confidence interval for each row of the data.

Author(s)

Ezra Haber Glenn eglenn@mit.edu.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load ACS data
data(kansas09)

# confidence intervals for select columns
confint(kansas09[20:25,], parm=c(4,5,10))

# another way to accomplish this
confint(kansas09[20:25,c(4,5,10)])

# store data and extract at will
my.conf <- confint(kansas09)
str(my.conf)
my.conf[32]
my.conf$Universe...TOTAL.POPULATION.IN.THE.UNITED.STATES..U.S..citizen.by.naturalization  

# try a different value for level
confint(kansas09[1:10,6], level=.75)

# ... or a one-sided confidence interval
confint(kansas09[1:10,6], level=.75, alternative="greater")
confint(kansas09[1:10,29], level=.75, alternative="less")
 

acs documentation built on May 1, 2019, 8:41 p.m.