diagnost: Diagnostic tool for generated sample

View source: R/gr_diagnost.R

diagnostR Documentation

Diagnostic tool for generated sample

Description

Performs diagnosis on the generated data according to a graphical model on a tree with cliquewise Huesler-Reiss distributions. As one diagnostic tool, the function produces a graph comparing the real marginal distribution with the empirical distribution of the variable in id. As a second diagnostic tool for every adjacent node to id it computes the real and the empirical copulas at the coordinates passed to y.

Usage

diagnost(obj, ...)

## S3 method for class 'HRMnetwork'
diagnost(obj, X, id, y, ...)

Arguments

obj

Object of class HRMtree

...

additional arguments

X

A matrix of data to be diagnosted

id

The name of the variable for which the diagnostics is done.

y

bivariate vector with elements between 0 and 1. The coordinates of the bivariate copula.

Value

No return value

Examples

# 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)
# do diagnostic on the node "b"
diagnost(myobj, mydata, "b", y = c(0.2,0.5) )
# include noise in the data
mydata<- rHRM(myobj, 1000, noise = TRUE)
diagnost(myobj, mydata, "c", y = c(0.5,0.5))

gremes documentation built on Feb. 16, 2023, 8:06 p.m.