Mvgt: General student t distribution

Description Usage Arguments Value See Also Examples

Description

Density and random generation for the general studen t distribution

Usage

1
2
dmvgt(theta, mit = list(), log=TRUE)
rmvgt(N,mit)

Arguments

theta

Vector of lenght N or Nxk matrix of quantiles. If theta is a matrix, each row is taken to be a quantile.

N

number of observations

mit

list defining the mixture components. See isMit for how it should be defined.

log

logical; if TRUE (default), probabilities p are given as ln(p).

Value

dmvgt returns vector of size N with density values for each row of theta

rmvgt returns an Nxk matrix of draws from the k-variate mixture of student t densities

See Also

isMit

Examples

1
2
3
4
5
6
7
8
  H      <- 2
  p      <- runif(H)
  p      =  p / sum(p) 
  mu     <- matrix(seq(1:H),H,1)
  Sigma  <- matrix(runif(H^2),H,H)
  df     <- seq(1:H)  
  Ndraws <- rmvgt(N=10,mit=list(p=p,mu=mu,Sigma=Sigma,df=df))
  pdraws <- dmvgt(theta=Ndraws,mit=list(p=p,mu=mu,Sigma=Sigma,df=df))

MitISEM documentation built on May 2, 2019, 1:57 p.m.