This function normalized the covariates in the data to lie in
the unit interval based on a principal component analysis. It is useful to
perform this step when defining the instrumental functions later on. This
function is used in G.box
, G.spline
and by extension G.cd
.
normalize.covariates2(
data = NULL,
x = NULL,
idxs.c = "all",
norm.cov.out = NULL,
...
)
(optional) Data set to be used to construct the normalizing
transformation. Default is data = NULL
.
(optional) Vector of covariates to be normalized alongside the data.
Default is x = NULL
.
(optional) Vector of indices of covariates that are continuous.
Note that that indices are relative to the covariate vector, not the full
data set. Default value is idxs.c = "all"
, which indicates that all
elements should be regarded as continuous. If idxs.c = NULL
, all
elements are regarded as discrete.
(optional) The output of a previous call to this function.
Can be used to speed up computation. If both data
and
norm.cov.out
are supplied to the function, the function will throw an
error. Default is norm.cov.out = NULL
Allows easier interchangeability between covariate normalization
functions. All arguments specified under ...
will be ignored.