NS {SNSchart} | R Documentation |
Normal Scores
Description
Get conditional or unconditional normal score (NS) of observations (X
)
relative to previous observations (Y
).
Usage
NS(
X,
Y = NULL,
theta = NULL,
Ftheta = NULL,
scoring = "Z",
Chi2corrector = "None",
alignment = "unadjusted",
constant = NULL,
absolute = FALSE
)
Arguments
X |
vector. New observations to obtain the N¡normal scores. |
Y |
vector. If |
theta |
scalar. Value corresponig with the |
Ftheta |
scalar. 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). |
Chi2corrector |
character string. Only when scoring is Z-SQ. Select from
If "approx" () (default). If "exact" (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
: vector. Ranks for theX
observations. If ties occurs, average ranks are used. -
P
: vector. 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
: vector. 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)
X <- c(30, 35, 45)
theta <- 40
Ftheta <- 0.5
# EXAMPLE CONDITIONAL
NS(X = X, Y = Y, theta = theta, Ftheta = Ftheta)
# EXAMPLE UNCONDITIONAL
theta <- NULL
Ftheta <- NULL
NS(X = X, Y = Y, theta = theta, Ftheta = Ftheta)