rg.wtdsums {StatDA} | R Documentation |
Calculate Weighted Sums for a Matrix
Description
This function computes a weighted sum for a matrix based on computed quantiles and user defined relative importance.
Usage
rg.wtdsums(x, ri, xcentr = NULL, xdisp = NULL)
Arguments
x |
matrix |
ri |
vector for the relative importance, length(ri)=length(x[1,]) |
xcentr |
the provided center |
xdisp |
the provided variance |
Details
It is not necessary to provide the center and the variance. If those values are not supplied the center is the 50% quantile and the variance is calculated from the 25% and 75% quantile.
Value
input |
input parameter |
centr |
the center |
disp |
the variance |
ri |
relative importance |
w |
weights |
a |
normalized weights |
ws |
normalized weights times standardized x |
Author(s)
Peter Filzmoser <P.Filzmoser@tuwien.ac.at> http://cstat.tuwien.ac.at/filz/
References
C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.
Examples
data(chorizon)
var=c("Si_XRF","Al_XRF","K_XRF","LOI","P","Mn")
ri=c(-2.0,1.5,2.0,2.0,3.0,2.0)
x=chorizon[,var]
rg.wtdsums(x,ri)