Familydata              package:epicalc              R Documentation

_D_a_t_a_s_e_t _o_f _a _h_y_p_o_t_h_e_t_i_c_a_l _f_a_m_i_l_y

_D_e_s_c_r_i_p_t_i_o_n:

     Anthropometric and financial data of a hypothetical family

_U_s_a_g_e:

     data(Familydata)

_F_o_r_m_a_t:

     A data frame with 11 observations on the following 6 variables.

     '_c_o_d_e' a character vector

     '_a_g_e' a numeric vector

     '_h_t' a numeric vector

     '_w_t' a numeric vector

     '_m_o_n_e_y' a numeric vector

     '_s_e_x' a factor with levels 'F' 'M'

_E_x_a_m_p_l_e_s:

     data(Familydata)
     use(Familydata)
     des()
     summ()
     age2 <- age^2
     plot(age, money, log="y")
     dots.of.age <- seq(0,80,0.01)
     new.data.frame <- data.frame(age=dots.of.age, age2=dots.of.age^2)
     lm1 <- lm(log(money) ~ age + age2)
     dots.of.money <- predict.lm(lm1, new.data.frame)
     lines(dots.of.age, exp(dots.of.money), col="blue")

