generateSample.tbn: Generates a sample from Tweedie Bayesian network

Description Usage Arguments Value Examples

Description

Generates an n-random sample according to a Tweedie Bayesian network with parameters (p,phi,beta)

Usage

1

Arguments

beta

a lower triangular matrix of the Tweedie Bayesian network coefficients.

phi

a vector of dispersion parameters.

p

a vector of power parameters.

n

an integer specifying the sample size.

Value

This function returns a matrix containing a random sample of n vectors drawn form a Tweedie Bayesian network.

Examples

1
2
3
4
5
6
7
beta = matrix(0,ncol=5,nrow=5)
beta[1,1] = 1;
beta[2,1] = 0.5
beta[3,1] = -0.5; beta[3,2] = -0.7;beta[3,3] = -1.2
beta[4,1] = -2; beta[4,3] = -1
beta[5,1] = 0.2; beta[5,4] = 1; beta[5,5] = -2
generateSample.tbn(beta, c(1,2,1.5,1,1), c(2,2,3,2,0), 100)

km20/tbn documentation built on May 29, 2019, 11:44 a.m.