Description Usage Arguments Details Value Author(s) Examples
Calculates pairwise statistics (-2*log-LR, AIC, or BIC) for each variable pair (edge) in the dataset.
1 |
dataset |
matrix or data frame ( |
homog |
|
forbEdges |
list with edges that should not be considered. Matrix with 2
columns, each row representing one edge, and each column one
of the vertices in the edge. Default is |
stat |
measure to be minimized: LR (-2*log-likelihood), AIC, or BIC.
Default is LR. It can also be a user defined function with
format: |
Calculates pairwise statistics (-2*log-LR, AIC, or BIC) for all possible edges, returning the values sorted in descending order.
A matrix with p(p-1)/2
lines and 4
columns, where each line
refers to a possible edge, and the columns are: vertex 1, vertex 2, value of
the statistic, and number of estimated parameters (degrees of freedom)
associated with the edge.
Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)
Rodrigo Labouriau (Rodrigo.Labouriau@math.au.dk)
David Edwards (David.Edwards@agrsci.dk)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | set.seed(7,kind="Mersenne-Twister")
dataset <- matrix(rnorm(1000),nrow=100,ncol=10)
m <- calcStat(dataset,stat="BIC")
data(dsCont)
# m1 <- calcStat(dataset,homog=TRUE,forbEdges=NULL,stat="LR")
# 1. in this case, there is no use for homog
# 2. no forbidden edges
# 3. the measure used is the LR (the result is a tree)
v <- calcStat(dsCont,homog=TRUE,forbEdges=NULL,stat="LR")
# result
head(v)
# column 1: first vertex of the edge
# column 2: second vertex of the edge
# column 3: in this case, -LR
# column 4: number of parameters for the edge
# [,1] [,2] [,3] [,4]
# [1,] 17 27 393.0072 1
# [2,] 21 27 343.5780 1
# [3,] 22 25 306.0097 1
# [4,] 17 21 302.9414 1
# [5,] 27 32 300.0275 1
# [6,] 21 32 289.4179 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.