Need expert statistical support?

More Info

Module

asreml.asreml

asreml module

Members

function

asreml

#
def asreml( data: Union[pandas.DataFrame, dict], response: Union[str, list[str]], fixed: Optional[str] = None, random: Optional[str] = None, sparse: Optional[str] = None, residual: Optional[str] = None, family: Optional[str] = None, weights: Optional[str] = None, predict: Union[list, dict, NoneType] = None, vpredict: Union[str, Dict[str, str], NoneType] = None, options: Optional[dict] = None, fit_options: Optional[dict] = None, monitor=None) -> asreml.ASReml:

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_data and define_categorical_variables for additional information.
  • response: A string or list of strings specifying the response variable(s) (see asreml.asreml_class.ASReml.setup_model for 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_options for details)
  • fit_options: A dictionary specifying any additional fit options (see asreml.asreml_class.ASReml.fit for details)
  • monitor: A monitor function (see asreml.asreml_class.ASReml.register_monitor_function for 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.wald and asreml.asreml_class.ASReml.predict asreml.asreml_class.ASReml.vpredict

Want to sharpen your statistics skills?

Browse Courses