Module
asreml.asreml
asreml module
Members
driver to set up and run an asreml model
Arguments:
- data: The data. This can take several forms:
a) A pandas data frame
b) A dictionary as returned by define_categorical_variables. This
dictionary may have the additional key "groups" added to it
containing group information.
c) A dictionary, with key "data" holding (a) or (b) from above, and
optionally, other keys holding secondary sources of data referenced
in the model, for example:
asreml(..., random="v1 + us(trait, init=initR)",...,
data={"data": main_data, "initR": [1,2,3]})
See
asreml.asreml_class.ASReml.add_dataand define_categorical_variables for additional information. - response: A string or list of strings specifying the response variable(s)
(see
asreml.asreml_class.ASReml.setup_modelfor more details on specifying the model) - fixed: A formula string specifying the fixed terms in the model.
- random: A formula string specifying the random effects in the model.
- sparse: A formula string specifying the fixed effects for which the full variance-covariance matrix is not required.
- residual: A formula string specifying the residual model.
- family: A string specifying the link and variance functions. For example "binomial(link=probit, dispersion=1, total=counts)"
- weights: A string identifying the column of data to use as weights in the fit.
- predict: A dictionary, or a list of such dictionaries, specifying the predictions
- to make from the model.
- vpredict: A formula string or dictionary specifying a function of random effects in the model to be estimated.
- options: A dictionary specifying any additional options
(see
asreml.asreml_class.ASReml.set_optionsfor details) - fit_options: A dictionary specifying any additional fit options
(see
asreml.asreml_class.ASReml.fitfor details) - monitor: A monitor function (see
asreml.asreml_class.ASReml.register_monitor_functionfor details)
Returns:
asr_obj: An ASReml object, results can then be obtained via the following methods:
asreml.asreml_class.ASReml.summary,asreml.asreml_class.ASReml.trace,asreml.asreml_class.ASReml.coefficients,asreml.asreml_class.ASReml.fitted,asreml.asreml_class.ASReml.residuals,asreml.asreml_class.ASReml.variance_components,asreml.asreml_class.ASReml.waldandasreml.asreml_class.ASReml.predictasreml.asreml_class.ASReml.vpredict