Learn R Programming

lclGWAS (version 1.0.3)

betaEst:

Description

A method to estimate the fixed effect parameter for a multivariate frailty model accounting for family structure of related individuals (i.e., trios). The input data is assumed to be organized such that records for each family occur consecutively, and that records for offspring precede those for parents. The variance matrix for the random effects is assumed to be of the form var*K, where K is a matrix of kinship coefficients between family members. The following groupings are permitted: (Individual), (Offspring, Offspring), (Offspring, Parent), (Offspring, Parent, Parent), and (Offspring, Offspring, Parent, Parent). Other family structures have not been implemented.

Usage

betaEst(fam_group, alpha, dtime, delta, g, var, lower, upper)

Arguments

fam_group
Vector of family indicators for each sample.
alpha
Vector of baseline survival rates for each time interval.
dtime
Vector of observed discrete survival times for each sample.
delta
Event indicator vector: 1 indicates observed event, 0 indicates censored.
g
Vector of numeric genotypes for each sample.
var
Scalar for frailty variance.
lower
Scalar for the lower bound of the fixed effect parameter estimation search region.
upper
Scalar for the upper bound of the fixed effect parameter estimation search region.

Value

A list with one object:
betaEst
Scalar estimate of the fixed effect parameter.

Examples

Run this code
# Generate dummy data	
fam_group <- rep(1:3,each=3)
alpha <- c(0.7500000, 0.6666667, 0.5000000, 0.0000000)
dtime <- c(1, 3, 3, 2, 1, 1, 2, 3, 1)
delta <- c(1, 0, 1, 1, 1, 0, 1, 0, 1)
g     <- c(0, 1, 1, 1, 2, 2, 0, 0, 0)
var   <- 0.2
res   <- betaEst(fam_group, alpha, dtime, delta, g, var, lower = 0, upper = 2) 
res

Run the code above in your browser using DataLab