createStrumModel(formulas,
ascertainment = NULL,
defaultError = '',
assumeExogCovariate = TRUE,
fixLoadingToOne = TRUE)
strumModel.strum function.
The formulas argument is given as a charactor string of several expressions that
defines the relationship among the variables. Blank lines and comments (line
start with #) can be included between formulas.
Three different equations are allowed in the formulas syntax:
fixLoadingToOneequals TRUE, setting
the first indicator variable for each factor to have a coefficient of 1. To
disable this option selectively for a coefficient to be estimated, use "coef"
operator. For example,coef(y1,z1) = NA.p, e, a or c
is not included in the model formulas, then, by default, the value of
defaultError is included in the model. For quantitative traits, the
e term should always be present. Therefore, the program automatically
include e term even if no error terms are specified either in
formulas nor in defaultError.
Note again that "a" (additive), "p" (polygenic), "c" (common environmental) and
"e"(independent environmental) are reserved variable names to specify a type of
variance component, so that may not be used as input arguments.strumModel # Model formulas.
#----------------
strumForm = 'bp =~ SBP + DBP
anger =~ A1 + A2 + A3
stress =~ S1 + S2 + S3
bp ~ anger + stress + <p,e>
stress ~ anger + rs6040343
var(stress)=.1
'
# Create a strumModel.
#---------------------
myStrumModel = createStrumModel(
formulas = strumForm,
ascertainment = "disease"
)Run the code above in your browser using DataLab