MNS {SNSchart} | R Documentation |
Multivariate Normal Scores
Description
Get conditional or unconditional multivariate normal score (NS) of observations (X
)
relative to previous observations (Y
).
Usage
MNS(
X,
Y = NULL,
theta = NULL,
Ftheta = NULL,
scoring = "Z",
alignment = "unadjusted",
constant = NULL,
absolute = FALSE
)
Arguments
X |
matrix or data.frame. New observations to obtain the normal scores. |
Y |
matrix or data.frame. If |
theta |
vector. Value corresponding with the |
Ftheta |
vector. Quantile of the data distribution. The values that take are between (0,1). |
scoring |
character string. If "Z" (normal scores) (default). If "Z-SQ" (normal scores squared). |
alignment |
character string. Aligment of the data
|
constant |
scalar. Only used when the |
absolute |
logical. If |
Value
Multiple output. Select by output$
-
R
: matrix. Multivariate Ranks for theX
observations. If ties occurs, average ranks are used. -
P
: matrix. Multivariate Probability of the ranks for theX
observations. Instead of Van Der Waerden normal scores whereP = R/(n+1)
,P = (R-0.5)/n
, whereR
stands for rank andP
for the input evaluated in the inverse of a Standard Normal Distribution. -
Z
: matrix. Multivariate Normal scores for theX
observations.Z
ifscoring
is "Z" andZ^2
ifscoring
is "Z-SQ".
Examples
Y <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
Y = matrix(Y, ncol=2)
X <- c(30, 35, 45, 30, 35, 45)
X = matrix(X, ncol=2)
theta <- c(40, 40)
Ftheta <- c(0.5, 0.5)
# EXAMPLE CONDITIONAL
MNS(X = X, Y = Y, theta = theta, Ftheta = Ftheta)