Learn R Programming

strum (version 0.6.2)

strum: STRUctural Modeling of Latent Variables for Family Data

Description

Main function to run strum analysis and return the result as a (list of) strumFittedModel.

Usage

strum(myStrumModel, myStrumData, step1OptimControl = list(maxit=5500, fnscale=-10), startValueControl = list(initPopulation=NULL, nChildren=NULL, nGenerations=NULL, selection1=NULL, selection2=NULL), step2OptimControl = list(maxit=5000, reltol=.Machine$double.eps), ibdMarkers=NULL)

Arguments

myStrumModel
Object of class strumModel.
myStrumData
Object of class strumData.
step1OptimControl
List of control parameters for optim function in step1.
startValueControl
List of control parameters for strating value generation function in step2.
step2OptimControl
List of control parameters for optim function in step2.
ibdMarkers
Character vector contaning the name of marker(s) for additive genetic variance component a (see Details).

Value

Returns a (list of) strumFittedModel object.

Details

Three parameters of this function provide more flexibility to users to control the strum analysis in different stage.

The step1OptimControl argument is given as a list of several control parameters that is passed directly to the function optim in the step 1 of model fitting.

The step2OptimControl argument is given as a list of several control parameters that is passed directly to the function optim in the step 2 of model fitting.

The startValueControl argument is given as a list of 5 parameters for the function to generate the starting values (using genetic algorithm) of model fitting in step 2. Five different parameters in the list are:

  • initPopulation

The size of initial population. The default value is the number of model parameters * 120.

  • nChildren
  • The number of children. The default value is the number of model parameters * 2.

  • nGenerations
  • The number of generation. The default value is 20.

  • selection1
  • The size of the initial selection. The default value is 15.

  • selection2
  • The size of the final selection. The default value is 15.

    Note that if the analysis model includes an additive genetic variance component a for the random effects, the value of iMarkers is used to determine the name of marker(s) for a from the imported ibd file. If no values are specified for ibdMarkers, then, by default, all imported ibd markers that exist in the myStrumData object are used, analyzing one by one. Therefore, the analysis result includes a list of strumFittedModel.

    See Also

    createStrumModel, createStrumData

    Examples

    Run this code
    ## Not run: 
    # # Run strum analysis.
    # # - myStrumModel is a strumModel object.
    # # - myStrumData is a strumData object.
    # #---------------------------------------
    # fitResult = strum(myStrumModel, myStrumData, ibdMarkers=c("marker1","marker2"))
    # ## End(Not run)
    

    Run the code above in your browser using DataLab