invGaussconvfactor: Inverse Gaussian convolution factor model

Description Usage Arguments Value See Also Examples

Description

Inverse Gaussian convolution factor model

Usage

1
2
3
4
5
6
7
8
rIGconv(n,th0,thvec,ze=1)
pmIGfact(xvec,th0,thvec,zero=0)
pmIGfact.gl(xvec,th0,thvec,gl)
dmIGfact(xvec,th0,thvec,zero=0)
dmIGfact.gl(xvec,th0,thvec,gl)
dbIGfact(x1,x2,th0,th1,th2,zero=0)  
pmIGfcop.gl(uvec,param,gl)
dmIGfcop.gl(uvec,param,gl)

Arguments

n

sample size for simulation

th0

scalar for shape parameter of the shared/common component

thvec

vector of shape parameters of individual components, length d

param

parameter vector with length d+1 with th0,thvec

xvec

vector of length d with positive values

uvec

vector of length d with values in (0,1)

gl

Gauss-Legendre object with components $nodes and $weights

ze

non-convolution parameter zeta, can be set to 1 for copula

zero

tolerance for numerical integration, set as 0.0001 if there are numerial problems

x1

positive value for first variable (bivariate case)

x2

positive value for second variable (bivariate case)

th1

scalar for shape parameter of first variable (bivariate case)

th2

scalar for shape parameter of second variable (bivariate case)

Value

random sample (nxd matrix) for rIGconv

cdf or pdf for remaining functions

See Also

invGauss gammaconvfactor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
n=1000
th0=2
thvec=c(.3,.3)
set.seed(123)
xdat=rIGconv(n,th0,thvec)
cor(xdat)
#plot(xdat)
gl=gausslegendre(25)
pmIGfact(c(1,1.1),th0,c(.4,.4),zero=0)
pmIGfact.gl(c(1,1.1),th0,c(.4,.4),gl)
# check that density is finite on diagonal
dbIGfact(1,1.1,th0,th1=.4,th2=.4,zero=0)
dmIGfact(c(1,1.1),th0,c(.4,.4),zero=0)
dmIGfact.gl(c(1,1.1),th0,c(.4,.4),gl)
dbIGfact(1,1.0001,th0,th1=.4,th2=.7,zero=0)
# copula 
pmIGfcop.gl(c(.5,.6),c(2,.4,.4),gl)
dmIGfcop.gl(c(.5,.6),c(2,.4,.4),gl)

YafeiXu/CopulaModel documentation built on May 9, 2019, 11:07 p.m.