Package 'UdderQuarterInfectionData'

Title: Udder Quarter Infection Data
Description: The udder quarter infection data set contains infection times of individual cow udder quarters with Corynebacterium bovis (Laevens et al. 1997 <DOI:10.3168/jds.S0022-0302(97)76295-7>). Obviously, the four udder quarters are clustered within a cow, and udder quarters are sampled only approximately monthly, generating interval-censored data. The data set contains both covariates that change within a cow (e.g., front and rear udder quarters) and covariates that change between cows (e.g., parity [the number of previous calvings]). The correlation between udder infection times within a cow also is of interest, because this is a measure of the infectivity of the agent causing the disease. Various models have been applied to address the problem of interdependence for right-censored event times. These models, as applied to this data set, can be found back in the publications found in the reference list.
Authors: Hans Laevens, Luc Duchateau, Klara Goethals, Ewoud De Troyer and Paul Janssen
Maintainer: Luc Duchateau <[email protected]>
License: GPL-3
Version: 1.0.0
Built: 2025-02-17 06:16:01 UTC
Source: https://github.com/cran/UdderQuarterInfectionData

Help Index


Gamma Frailty Interval Censoring

Description

Application of the Gamma Frailty Interval Censoring Model on the Udder Quarter Infection Data Set. For more information see Details.

Usage

Gamma_Frailty_Interval_Censoring(print.level = 2)

Arguments

print.level

Parameter of nlm (default=2): this argument determines the level of printing which is done during the minimization process. The default value of 0 means that no printing occurs, a value of 1 means that initial and final details are printed and a value of 2 means that full tracing information is printed.

Details

This function fits a parametric Weibull baseline hazard frailty model with gamma distributed frailties for the udder quarter infection data taking into consideration the interval censored nature of the data. Further theoretical details can be found in the paper in the reference

Value

Returns a list with the NLM result in nlm and the covariance matrix in covmat.

R Code for Model

The source R code for this model can found:

  • in the doc/Models_R_Code.R file in the package installation folder.

  • by accessing the function by calling Gamma_Frailty_Interval_Censoring (without brackets) or getAnywhere("Gamma_Frailty_Interval_Censoring").

Author(s)

Klara Goethals

Luc Duchateau

References

Goethals, K., Ampe, B., Berkvens, D., Laevens, H., Janssen, P. and Duchateau, L. (2009). Modeling interval-censored, clustered cow udder quarter infection times through the shared gamma frailty model. Journal of Agricultural Biological and Environmental Statistics 14, 1-14.

Examples

## Not run: 
library(UdderQuarterInfectionData)
data("udderquarterinfection")

Gamma_Frailty_Interval_Censoring()
# $nlm
# $nlm$minimum
# [1] 5670.491
#
# $nlm$estimate
# [1] 3.7967246 0.1201593 1.9672298 0.8590531
#
# $nlm$gradient
# [1]  0.0002924871  0.0017653292 -0.0005460029  0.0003265086
#
# $nlm$hessian
# [,1]       [,2]      [,3]       [,4]
# [1,]   23.22965  -117.7682 -39.93813  -10.10561
# [2,] -117.76825 15471.4753 567.24283 1228.87332
# [3,]  -39.93813   567.2428 664.76359   24.63047
# [4,]  -10.10561  1228.8733  24.63047  147.76479
#
# $nlm$code
# [1] 1
#
# $nlm$iterations
# [1] 22
#
#
# $covmat
# [,1]          [,2]          [,3]         [,4]
# [1,] 0.049281911  0.0001242730  0.0027853686  0.001872592
# [2,] 0.000124273  0.0001982213 -0.0001015391 -0.001623066
# [3,] 0.002785369 -0.0001015391  0.0017306214  0.000746460
# [4,] 0.001872592 -0.0016230660  0.0007464600  0.020269244

## End(Not run)

Udder Quarter Infection Data

Description

The udder quarter infection data contains the times to infection of the individual udder quarters of 100 cows during one lactation period. The 'cowid' variable contains the cow number. Each cow has 4 different quarters, with the variable 'quarter' referring to the specific quarter, i.e., RF: right front, RR: right rear, LF: left front, LR: left rear. The lactation number, i.e., the number of calvings that the cow has experienced, is given by the variable 'lactation'. If at least one infection occurs in a quarter during the lactation period, the 'status' variable is set to 1, and the interval [t1,t2] in which an infection takes place is given by the variables 'left' and 'right', where 'right' denotes the time with the first positive result, and 'left' the last time (with a negative result) before the first positive result. Only the first infection is contained in the data set. If no infection occurs, the 'status' variable is set to 1, and the last interval [t1,t2] in which the quarter was observed is put in the variables 'left' and 'right'.,

The following example analyses of this data set are currently available in the package:

Format

A dataframe with 4784 rows and 6 variables.

Examples

## Not run: 
## SHORT DATASET ANALYSIS ##

library(UdderQuarterInfectionData)
data("udderquarterinfection")

Gamma_Frailty_Interval_Censoring()
# $nlm
# $nlm$minimum
# [1] 5670.491
#
# $nlm$estimate
# [1] 3.7967246 0.1201593 1.9672298 0.8590531
#
# $nlm$gradient
# [1]  0.0002924871  0.0017653292 -0.0005460029  0.0003265086
#
# $nlm$hessian
# [,1]       [,2]      [,3]       [,4]
# [1,]   23.22965  -117.7682 -39.93813  -10.10561
# [2,] -117.76825 15471.4753 567.24283 1228.87332
# [3,]  -39.93813   567.2428 664.76359   24.63047
# [4,]  -10.10561  1228.8733  24.63047  147.76479
#
# $nlm$code
# [1] 1
#
# $nlm$iterations
# [1] 22
#
#
# $covmat
# [,1]          [,2]          [,3]         [,4]
# [1,] 0.049281911  0.0001242730  0.0027853686  0.001872592
# [2,] 0.000124273  0.0001982213 -0.0001015391 -0.001623066
# [3,] 0.002785369 -0.0001015391  0.0017306214  0.000746460
# [4,] 0.001872592 -0.0016230660  0.0007464600  0.020269244

## End(Not run)

Udder Quarter Infection Data

Description

This package is built up around a data set consisting of clustered infection times in the four udder quarters of cows. Due to the special structure of these data, i.e., quadruples of four clustered event times, thye have been used to develop new techniques in the area of multivariate survival data (see references). This package avails the data on which the analyses presented in the papers were based, and also, where possible, provides the R-code to fit the proposed models.

Author(s)

Hans Laevens

Luc Duchateau

Klara Goethals

Ewoud de Troyer

Paul Janssen

References

Laevens, H., Deluyker, H., Schukken, Y.H., De Meulemeester, L., Vandermeersch, R., De Muelenaere, E. and De Kruif, A. (1997). Influence of parity and stage of lactation on the somatic cell count in bacteriologically negative dairy cows. Journal of Dairy Science 80, 3219-3226.

Massonnet, G., Janssen, P. and Duchateau, L. (2009). Modelling udder infection data using copula models for quadruples. Journal of Statistical Planning and Inference 139, 3865-3877.

Goethals, K., Ampe, B., Berkvens, D., Laevens, H., Janssen, P. and Duchateau, L. (2009). Modeling interval-censored, clustered cow udder quarter infection times through the shared gamma frailty model. Journal of Agricultural Biological and Environmental Statistics 14, 1-14.

Janssen, P. and Duchateau, L. (2011). Comments on: Inference in multivariate Archimedean copula models. Test 20, 271-275.

Ampe, B., Goethals, K., Laevens, H. and Duchateau, L. (2012). Investigating clustering in interval-censored udder quarter infection times in dairy cows using a gamma frailty model. Preventive Veterinary Medicine 106, 251-257.

Kuhn, E., Goethals, K., El-Nouty, C. and Duchateau, L. (2016). Assessing the correlation structure in cow udder quarter infection times through extensions of the correlated frailty model. Journal of Agricultural Biological and Environmental Statistics 21, 601-618.

Geerdens, C., Claeskens, G., Janssen, P. (2016). Copula based flexible modeling of associations between clustered event times. Lifetime data analysis 22, 363-381.

Verbelen, R., Antonio, K. and Claeskens, G. (2016). Multivariate mixtures of Erlangs for density estimation under censoring. Lifetime data analysis 22, 429-455.

Prenen, L., Duchateau, L. and Braekers, R. (2018). Investigating the correlation structure of quadrivariate udder infection times through hierarchical Archimedean copulas. Accepted for publication in Lifetime Data Analysis.