Description Usage Arguments Value Model Description See Also
View source: R/moretrees_design_matrix.R
All the details go here!
1 | moretrees_design_matrix(y, X, W = NULL, outcomes, tr, W_method = "shared")
|
y |
Vector of length n containing outcomes data. If family = "bernoulli", y must be an integer vector where 1 = success, 0 = failure. If family = "gaussian", y must be a numeric vector containing continuous data. |
X |
An n x K matrix of exposure data, where K is the dimension of the exposure. Grouping of the outcomes will be based on their relationships with the variables in X. |
W |
Matrix of covariates of dimension n x m. Coefficients for these variables do not affect grouping of the outcomes. Default is NULL (no covariates). |
outcomes |
is a character vector of length n, where entry i |
tr |
is an igraph tree, where the leaves represent outcomes |
W_method |
= "shared" if information about the effect of variables in W wil be shared across the outcomes according to the tree structure. If W_method = "individual", the effect of W will be estimated separately for each outcome (no infromation sharing). |
A list containing the following elements: Xstar: a MOReTreeS design matrix of size n x (K * p) for the exposure. Note that the rows of Xstar[[i]] have been ro-ordered according to the vector ord, and so may have a different ordering from X. groups: a list of length p indicating the columns of X which correspond to the same node on the tree. Used for spike and slab variable selection on the nodes. Wstar: the MOReTreeS design matrices for covariates. If share_W = T, this will be a sparse Matrix of dimension n x (p * m), where m is the number of columns of W. If share_W = F, Wstar is just W with re-ordered rows. Wstar is NULL if W is NULL. y_reord: Re-ordered outcome vector. A: A sparse Matrix of dimension p x p, where p is the number of nodes in tr. A_ij = 1 if j = i or node j is an ancestor of node i; A_ij = 0 otherwise. ord = integer vector indicating order of rows in Xstar relative to input matrix X.
Describe group spike and slab prior and all parameters here.
Other MOReTreeS functions:
moretrees_compute_betas()
,
moretrees_compute_thetas()
,
moretrees_design_tree()
,
moretrees_init_W_logistic()
,
moretrees_init_logistic()
,
moretrees_init_rand()
,
moretrees()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.