https://github.com/cran/epicalc
Raw File
Tip revision: d93e7a5e311f839fd00eed0643bd99241441f0c8 authored by Virasakdi Chongsuvivatwong on 28 September 2007, 00:00:00 UTC
version 2.5.1.5
Tip revision: d93e7a5
familydata.rd
\name{Familydata}
\alias{Familydata}
\docType{data}
\title{ Dataset of a hypothetical family}
\description{ Anthropometric and financial data of a hypothetical family}
\usage{data(Familydata)}
\format{
  A data frame with 11 observations on the following 6 variables.
  \describe{
    \item{\code{code}}{a character vector}
    \item{\code{age}}{a numeric vector}
    \item{\code{ht}}{a numeric vector}
    \item{\code{wt}}{a numeric vector}
    \item{\code{money}}{a numeric vector}
    \item{\code{sex}}{a factor with levels \code{F} \code{M}}
  }
}
\examples{
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")
}
\keyword{datasets}
back to top