View source: R/priorKnowledge.R
rnormMultiv | R Documentation |
Generate a multivariate normal data vector taking into account the real data and the relationships with other variables in the dataset.
rnormMultiv(n, dataParents, dataChild)
n |
A |
dataParents |
A data set of class |
dataChild |
A |
A "numeric"
vector giving the prior data values.
generateNormalPriorData
## Data data(ecoli) data <- ecoli[,-c(1,9)] ## remove sequece.name and class ## DAG dag <- LearningHC(data) plot(dag) getChildParentsFromGraph(dag) ## 1. Random sample parents <- "mcg" child <- "alm1" n <- 1000 rnormMultiv(n, dataParents = data.frame(data[,parents]), dataChild = data[,child]) ## 2. Random sample parents <- "alm1" child <- "aac" n <- 256 rnormMultiv(n, dataParents = data.frame(data[,parents]), dataChild = data[,child])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.