lim: Linear interpolation method to calculate y value at time t0.

Description Usage Arguments Details Value Author(s) Examples

Description

This function uses linear interpolation method to calculate corresponding y value at time t0.

Usage

1
lim(x, y, id, t0)

Arguments

x

vector of ages.

y

vector of measurements.

id

factor of subject identifiers.

t0

target age value.

Details

For each individual's measurements in growth data set, the first time measurement is usually not the same, people are interested in some measurement index of certain age, for example height of age 6 years old for each id. This function can help us compute corresponding measurement at interested age.

Value

a data frame including id and corresponding y value at t0.

Author(s)

Zhiqiang Cao zcaoae@connect.ust.hk, Man-Yu Wong mamywong@ust.hk

Examples

1
2
3
4
5
6
7
require(sitar)
data(heights)
x <- heights$age
h <- heights$height
id <- heights$id
## height at age 9
h9 <- lim(x,h,id,9)  

Zhiqiangcao/gmusim documentation built on May 10, 2019, 1:58 a.m.