observe.incid: observe date of incidence for any value (qualitative code,...

Description Usage Arguments Value

View source: R/observe.incid.R

Description

a long dataset (repeated measures within id) with a set of timestamped qualitative codes will be reduced to just the date of first occurence each code before the deadline (index date)

Usage

1
observe.incid(data, id, index.date, value, valid.values, relative = F)

Arguments

data

a data frame with a 'date' column, an index.date column, an id column, a value column to be reduced to one row per id with the timestamp of the earliest observation of any valid value.

id

name of id column.

index.date

name of index date column; used for relative measures of incidence

value

name of column with actual value corresponding to the label of metric contained in the code column

valid.values

optional list of valid codes to weed out irrelevant measures

relative

logical indicating whether or not incidence dates are number of days relative to index.date

Value

a data frame with one row per id and columns for each valid type of value containing the timestamp (date) of incidence


socioskop/grit documentation built on Dec. 23, 2021, 3:30 a.m.