Learn R Programming

ibdreg (version 0.3.8)

create.pairs.frame: create a data frame for relative pairs

Description

create a data frame for relative pairs containing identifiers, response, and covariates

Usage

create.pairs.frame(ibd.dat, model.mat, formula, c.scale)
create.pairs.frame.cvec(c.scale, prior2, prior1)

Value

a list of 3 data frames all with the same number of rows. These data frames are id.df (3-columns of ped.id, person1.id, person2.id), y.mat (estimated ibd allele sharing, which is the regression response), status.df (3-columns for AA, UU, or AU status for the pair), x.mat (model matrix with intercept and, if covariates in formula, columns for covariates).

Arguments

ibd.dat

object of class ibd.dat

model.mat

a model matrix containing covariates for each person; to be used in making covariates for the relative pair

formula

format is either ~1 or ~pairs.fun(cov1). If the latter, the columns of the returned x.mat will be the result of the function operated on the covariate for each relative in the relative pair.

c.scale

scaling factor for covariates. Either "nodom" for no dominance variance or "minimax".

prior2

Prior probability of relative pairs to share 2 alleles ibd (from ibd.dat object)

prior1

Prior probability of relative pairs to share 1 allele ibd (from ibd.dat object)

See Also

create.ibd.dat