Construct an S3 object for PSD in double-precision or MPFR
Usage
SPSD(sigma, alpha, gamma, beta=0, mpfr=0)
Arguments
sigma
sigma value of PSD
alpha
alpha value of PSD
gamma
gamma value of PSD
beta
optional beta value of PSD for skewness
mpfr
optional mpfr precision. Default is 0, which sets all calculations in double precision.
For MPFR, set it to an integer, typically one of 64, 96, 128.
Value
Return an S3 object of LIHNPSD class that can be used for subsequent calculation.
Note
This constructor doesn't include the location parameter.
See Also
See also package's example for the DJIA parameters.
Examples
# Normal distribution
SPSD( 1,0,0 )
# PSD that approximate DJIA
SPSD(0.004625, 0.292645, 0.482744, -0.154049)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LIHNPSD)
Loading required package: sn
Loading required package: stats4
Attaching package: 'sn'
The following object is masked from 'package:stats':
sd
Loading required package: moments
Loading required package: BB
Loading required package: Bolstad2
Loading required package: optimx
Loading required package: Rmpfr
Loading required package: gmp
Attaching package: 'gmp'
The following objects are masked from 'package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: 'Rmpfr'
The following object is masked from 'package:sn':
zeta
The following objects are masked from 'package:stats':
dbinom, dnorm, dpois, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
Attaching package: 'LIHNPSD'
The following object is masked from 'package:stats':
density
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LIHNPSD/SPSD.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SPSD
> ### Title: Simple PSD constructor
> ### Aliases: SPSD
> ### Keywords: Constructor
>
> ### ** Examples
>
> # Normal distribution
> SPSD( 1,0,0 )
$sigma
[1] 1
$alpha
[1] 0
$gamma
[1] 0
$beta
[1] 0
$mpfr
[1] 0
$location
[1] 0
$lambda
[1] 1
$epsilon
[1] 1e-10
$pi
[1] 3.141593
$rawmean
[1] 0
attr(,"class")
[1] "LIHNPSD"
> # PSD that approximate DJIA
> SPSD(0.004625, 0.292645, 0.482744, -0.154049)
$sigma
[1] 0.004625
$alpha
[1] 0.292645
$gamma
[1] 0.482744
$beta
[1] -0.154049
$mpfr
[1] 0
$location
[1] 0
$lambda
[1] 1
$epsilon
[1] 1e-10
$pi
[1] 3.141593
$rawmean
[1] -0.001468851
attr(,"class")
[1] "LIHNPSD"
>
>
>
>
>
> dev.off()
null device
1
>