Set control parameters for multic

Share:

Description

Allows users to alter the default behavior of multic

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
multic.control(epsilon = 1e-5,
               max.iterations = 50,
               boundary.fix = TRUE,
               constraints = c("E", "E", "E", "E", "F", "F", "F"),
               initial.values = NULL,
               save.output.files = FALSE,
               method = c("multic", "leastsq", "maxfun", "emvc"),
               calc.fam.log.liks = FALSE,
               calc.residuals = FALSE,
               keep.input = calc.residuals)

Arguments

epsilon

a numeric value specifying the convergence threshold. When the difference of an iteration's loglikelihood and the previous iteration's loglikelihood are less than epsilon, the value has "converged".

max.iterations

an integer value specifying the maximum number of iterations multic will take to converge during the polygenic and sporadic model calculations.

boundary.fix

logical flag: if TRUE, then the variances generated will be fixed to 0 and no longer estimated when they become less than 0.00001 (1e-5).

constraints

a character vector of length seven (7) specifying the constraints on the random effects variance components. Each value of the vector needs to be either "E" - ‘E’stimate the variance and covariance, "C" - estimate the variance and ‘C’onstrain the covariance, or "F" - ‘F’ix the variance and covariance to 0. Each index of constraints corresponds to (in this exact order) mu, polygene, major gene, environment, sibling-sibling, parent-parent, and parent-offspring.

initial.values

numeric vector: use the specified initial values instead of calculating them automatically. This vector has a very specific length and order. If n is the number of traits and m is ( n + (n-1) + (n-2) + ... + 1 ), then the length must be n + 6 * m. So for one trait (univariate), the length must be 7, for two traits (bivariate), 20, and so on. The position of the values in the vector is important as well. The first n terms are the mu starting values. The next starting values come in chunks of m. The next m values are the polygenic starting values, followed by major gene, environmental, sibling-sibling, parent-parent, and parent-offspring starting values. The metadata\$null.initial.values contains the placement of the starting values. You can use this to verify your order is correct.

save.output.files

logical flag: if TRUE, then the multiple temporary output files multic generates are not removed. This is mostly for debugging purposes and is very likely to be not useful to the user community.

method

a character value specifying the method to use in fitting the model. Possible values include "multic" (default), "leastsq", "maxfun", and "emvc" (all case insensitive).

calc.fam.log.liks

logical flag: if TRUE, then the family log likelihoods will be returned in the multic object. WARNING: This significantly increases the size of the returned multic object.

calc.residuals

logical flag: if TRUE, then the residuals will be calculated and Y beta differences and V matrix data will be returned in the multic object. WARNING: This dramatically increases the size of the returned multic object.

keep.input

logical flag: if TRUE, then the traits and covariates will be saved in the metdata list of the multic object. Since the input is needed during special residual calculations, its default value is that of calc.residuals.

Value

a list that is designed to be supplied as a control argument to multic. The values for multic.control can be supplied directly in a call to multic (via the ... parameter). These values are then filtered through multic.control inside multic.

See Also

multic, multic.object

Examples

1
2
3
4
5
6
7
## Not run: 
## The following calls to multic are equivalent 
multic(formula, data, control = multic.control(calc.fam.log.liks = TRUE,
                                               calc.residuals = TRUE))  
multic(formula, data, calc.fam.log.liks = TRUE, calc.residuals = TRUE)

## End(Not run)