-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparnames.Rmd
63 lines (52 loc) · 3.27 KB
/
parnames.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: "``brms::parnames`` Extract Parameter Names"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(brms)
```
#### Description
Extract all parameter names of a given model.
#### Usage
<pre><code>
parnames(x, ...)
</code></pre>
#### Arguments
x An R object
* `` ... ``: Further arguments passed to or from other methods.
#### Details
Currently there are methods for brmsfit objects.
#### Value
A character vector containing the parameter names of the model.
Author(s)
Paul-Christian Buerkner <[email protected]>
parse_bf Parse Formulas of brms Models
#### Description
Parse formulas objects for use in brms.
#### Usage
<pre><code>
parse_bf(formula, ...)
## Default S3 method:
parse_bf(formula, family = NULL, autocor = NULL, ...)
## S3 method for class 'brmsformula'
parse_bf(formula, family = NULL, autocor = NULL,
check_response = TRUE, resp_rhs_all = TRUE, mv = FALSE, ...)
## S3 method for class 'mvbrmsformula'
parse_bf(formula, family = NULL,
autocor = NULL, ...)
</code></pre>
#### Arguments
* `` formula`` An object of class formula, brmsformula, or mvbrmsformula (or one that can be coerced to that classes): A symbolic #### Description of the model to be fitted. The details of model specification are explained in brmsformula.
* `` ... ``: Further arguments passed to or from other methods.
* `` family`` A description of the response distribution and link function to be used in the model. This can be a family function, a call to a family function or a character string naming the family. Every family function has a link argument allowing to specify the link function to be applied on the response variable. If not specified, default links are used. For details of supported families see brmsfamily. By default, a linear gaussian model is applied. In multivariate models, family might also be a list of families.
* ``autocor`` An optional cor_brms object describing the correlation structure within the response variable (i.e., the ’autocorrelation’). See the documentation of cor_brms for a description of the available correlation structures. Defaults to NULL, corresponding to no correlations. In multivariate models, autocor might also be a list of autocorrelation structures.
* `` check_response`` Logical; Indicates whether the left-hand side of formula (i.e. response variables and addition arguments) should be parsed. If FALSE, formula may also be onesided.
* `` resp_rhs_all`` Logical; Indicates whether to also include response variables on the right-hand side of formula .$allvars, where . represents the output of parse_bf.
* `` mv`` Indicates if the univariate model is part of a multivariate model.
#### Details
This is the main formula parsing function of brms. It should usually not be called directly, but is exported to allow package developers making use of the formula syntax implemented in brms. As long as no other packages depend on this functions, it may be changed without deprecation warnings, when new features make this necessary.
#### Value
An object of class brmsterms or mvbrmsterms (for multivariate models), which is a list containing all required information initially stored in formula in an easier to use format, basically a list of formulas (not an abstract syntax tree).
See Also
brm, brmsformula, mvbrmsformula