rHRM | R Documentation |
If the method is called on object of class HRMtree
it generates a random sample from
a Markov tree whose every two adjacent nodes are parameterized
with a bivariate Huesler-Reiss distribution with parameter the weight associated to the edge connecting the
two variables. Markov tree means that the random vector satisfies the global Markov property.
See Vignette "Additional functionalities" for further explanation of the distribution from which it is sampled.
If the method is called on an object of class HRMBG
then it generates a random sample from a
Huesler-Reiss distribution with structured parameter matrix.
See Vignette "Additional functionalities" for further explanation of the distribution from which it is sampled.
See Vignette "Huesler-Reiss distributions" for the parameterization on block graphs.
rHRM(obj, ...) ## S3 method for class 'HRMnetwork' rHRM(obj, n, noise = FALSE, ...) ## S3 method for class 'HRMBG' rHRM(obj, lambda, n, noise = FALSE, ...)
obj |
Object of class |
... |
additional arguments |
n |
The size of the sample |
noise |
TRUE/FALSE indicates whether to include (TRUE) a standard normal noise to all observations in the sample. The default is FALSE. |
lambda |
is a structured parameter matrix of the Huesler-Reiss distribution. See Vignette "Huesler-Reiss distributions" parameterization on block graphs. |
A matrix with the generated observations.
# create a graph with named vertices g<- graph(c("a", "b", "b","c", "b", "d"), directed = FALSE) # create a HRMtree object myobj<- HRMtree(g) x<- c(0.1,0.2,0.3) myobj<- setParams(myobj, x) # create a dataset mydata<- rHRM(myobj, 1000) mydata_noisy<- rHRM(myobj, 1000, noise=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.