PM.matrix {NNS} | R Documentation |
This function generates a co-partial moment matrix for the specified co-partial moment.
PM.matrix( LPM.degree, UPM.degree, target = NULL, variable, pop.adj = FALSE, ncores = NULL )
LPM.degree |
integer; Degree for |
UPM.degree |
integer; Degree for |
target |
numeric; Typically the mean of Variable X for classical statistics equivalences, but does not have to be. (Vectorized) |
variable |
a numeric matrix or data.frame. |
pop.adj |
logical; |
ncores |
integer; value specifying the number of cores to be used in the parallelized procedure. If NULL (default), the number of cores to be used is equal to the number of cores of the machine - 1. |
Matrix of partial moment quadrant values (CUPM, DUPM, DLPM, CLPM), and overall covariance matrix. Uncalled quadrants will return a matrix of zeros.
For divergent asymmetical "D.LPM" and "D.UPM"
matrices, matrix is D.LPM(column,row,...)
.
Fred Viole, OVVO Financial Systems
Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" https://www.amazon.com/dp/1490523995/ref=cm_sw_su_dp
Viole, F. (2017) "Bayes' Theorem From Partial Moments" https://www.ssrn.com/abstract=3457377
set.seed(123) x <- rnorm(100) ; y <- rnorm(100) ; z <- rnorm(100) A <- cbind(x,y,z) PM.matrix(LPM.degree = 1, UPM.degree = 1, variable = A, ncores = 1) ## Use of vectorized numeric targets (target_x, target_y, target_z) PM.matrix(LPM.degree = 1, UPM.degree = 1, target = c(0, 0.15, .25), variable = A, ncores = 1) ## Calling Individual Partial Moment Quadrants cov.mtx <- PM.matrix(LPM.degree = 1, UPM.degree = 1, variable = A, ncores = 1) cov.mtx$cupm ## Full covariance matrix cov.mtx$cov.matrix