Learn R Programming

parfm (version 2.7.7)

culling: Culling of dairy heifer cows

Description

The time to culling is studied in heifers as a function of the somatic cell count (SCC) measured between 5 and 15 days (measurement day) after calving.

High somatic cell count (we use the logarithm of somatic cell count as covariate) might be a surrogate marker for intramammary infections. Heifers which have intramammary infections or which are expected to develop intramammary infections in the future are quite expensive to keep due to the high costs for drugs and the loss in milk production.

Cows are followed up for an entire lactation period (roughly 300--50 days) and, if they are still alive at the end of the lactation period, they are censored at that time. Cows are further clustered within herds and this clustering needs to be taken into account as culling policy and also SCC in early lactation might differ substantially between the herds.

Usage

data(culling)

Arguments

Format

A dataframe containing 13836 observations.

Cowid:

Cow's identifyier.

Time:

Time to culling (in days).

Status:

Censored (0) or observed (1) event time.

Herd:

Herd identifyier.

Timeasses:

SCC measurement day.

LogSCC:

Logarithm of the somatic cell count.

References

Duchateau L, Janssen P (2008). The frailty model. Springer. New York: Springer--Verlag.

Examples

Run this code
# \donttest{
data(culling)
head(culling)
culling <- culling[culling$Time > 0,]
culling$TimeMonths <- culling$Time * 12 / 365.25

coxmod <- parfm(Surv(TimeMonths, Status) ~ LogSCC, data = culling,
                dist = "exponential", frailty = "none")
coxmod

pfmod <- parfm(Surv(TimeMonths, Status) ~ LogSCC, data = culling,
               cluster = "Herd", dist = "exponential", frailty = "gamma")
pfmod
# }

Run the code above in your browser using DataLab