buildRegressions | R Documentation |
This function takes a covariance matrix and list of variables and their parents and returns a collection of regression model parameters for each variable regressed on its parents. This is a compact representation of a normal graphical model.
buildRegressions(Sigma, means = 0,
parents = buildParentList(structMatrix(Sigma)))
Sigma |
A covariance matrix among a collection of continuous variables. |
means |
The means of those variables |
parents |
A named list of length equal to |
This function performs one regression for each element of the
parents
list. The name of the dependent variable for each
regression is given by names(parents)
and the independent
variables is given by the values of parents
. (The function
buildParentList()
builds a suitable list of elements.)
If means
is not supplied, then the variables are assumed to be
centered, otherwise the given vector is used as the means.
A list of length equal to parents
whose elements are also a
list having the following structure
b |
A vector of slopes for the regression with names equal to the
names of the parent variables. Note that if there are no parents,
this will be |
a |
The intercept from the regression. |
std |
The residual standard deviation from the regression. |
Russell Almond
Almond, R. G. (2010). ‘I can name that Bayesian network in two matrixes.’ International Journal of Approximate Reasoning. 51, 167-178.
buildParentList
,
buildRegressionTables
data(MathGrades)
pl <- buildParentList(structMatrix(MathGrades$var),"Algebra")
rt <- buildRegressions(MathGrades$var,MathGrades$mean,pl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.