Learn R Programming

psychTools (version 2.4.3)

income: US family income from US census 2008

Description

US census data on family income from 2008

Usage

data(income)

Arguments

Format

A data frame with 44 observations on the following 4 variables.

value

lower boundary of the income group

count

Number of families within that income group

mean

Mean of the category

prop

proportion of families

Details

The distribution of income is a nice example of a log normal distribution. It is also an interesting example of the power of graphics. It is quite clear when graphing the data that income statistics are bunched to the nearest 5K. That is, there is a clear sawtooth pattern in the data.

The all.income set is interpolates intervening values for 100-150K, 150-200K and 200-250K

Examples

Run this code
data(income)
with(income[1:40,], plot(mean,prop, main="US family income for 2008",xlab="income", 
        ylab="Proportion of families",xlim=c(0,100000)))
with (income[1:40,], points(lowess(mean,prop,f=.3),typ="l"))
psych::describe(income)


with(all.income, plot(mean,prop, main="US family income for 2008",xlab="income", 
                ylab="Proportion of families",xlim=c(0,250000)))
with (all.income[1:50,], points(lowess(mean,prop,f=.25),typ="l"))

Run the code above in your browser using DataLab