SPAC: A flexible copula-based approach for the analysis of...

Description Usage Arguments Details Value Author(s)

View source: R/mainSPAC.R

Description

Main function of the SPAC package

Usage

1
2
3
SPAC(y1 = NULL, y2 = NULL, G = NULL, covariates = NULL,
  prev = NULL, cutoffs = NULL, link = "probit",
  copfit = "Gaussian", method = "pros", Design = "CC")

Arguments

y1

vector designates the primary phenotype (one row-entry per individual), of length n.

y2

vector designates the secondary phenotype (one row-entry per individual), of length n.

G

vector deignates the SNP of interest for which the association test specified by the method parameter should be run. The vector has length n.

covariates

matrix of covariates NOT-including intercept (dimension: n \times p, with p the number of covariates).

prev

scalar between 0 and 1, specifies the primary phenotype prevalance. It is needed for the method = "prosp" and Design equals "CC" or "MT". Default is prev = NULL. If it is not specified, it will be estimated form the data.

cutoffs

vector or scalar, depending on the sampling mechanism design Design. Can be one of the following:

  • c(ylb,yub), a vector of length 2 for the extreme-trait sampling design, if Design = "ET". ylb, yub: the lower (ylb) and the upper (yub) primary trait thresholds

  • yub, a scalar for the muliple-trait sampling design, if Design = "MT". yub: the upper (yub) secondary trait threshold.

link

character, specifies the link function to be used for modelling the marginal distribution of the binary primary phenotype for the CC and MT designs. The available link functions are link=c("probit","logit","cloglog"). The defaut is link = "probit", which th liabiltiy latent model.

copfit

character, selects the copula to use for modelling priamry-secondary phenptypes dependence. Can be one of the following:

  • "Gaussian" (default)

  • "Student", Student copula with degree of freedom equals 10

  • "Clayton", Clayton copula

  • "Gumbel", Gumbel copula

  • "Frank", Frank copula

method

character, selects the method to use for correcting the sampling mechanism bias. Can be one of the following:

  • "pros" (default), copula-based prospective method

  • "retros", copula-based retrospective method. Since the copula-based restrspective method does not take into account for the covariates, if the user specifies method="retros", in presence of cavariates, the latter will simply be ignored from the analysis

Design

character, specifies the sampling design of the data. Can be one of the following:

  • "CC" (default), for the Case-Control sampling mechanism

  • "ET", for the Extreme-Trait sampling mechanism

  • "MT", for the Multiple-Trait sampling mechanism

Details

The SPAC function is the main function of the SPAC used package.

Value

A list containing results of the association test specified by the method parameter using the copula model for modelling primary-secondary dependency by the copfit parameter for the sampling mechanism Design. The output list contains the following results:

Author(s)

Karim Oualkacha


KarimOualkacha/SPAC documentation built on Dec. 1, 2019, 12:28 a.m.