getweights {LogConcDEAD} | R Documentation |
This function takes takes a matrix
of (possibly
binned) data and returns a matrix
containing the distinct
observations, and a vector
of weights w as described below.
getweights(x) lcd.getweights(x)
x |
a data matrix |
Given an n x d matrix
x of points in
R^d, this function removes duplicated observations, and
counts the number of times each observation occurs. This is used to
compute a vector
w such that
w[i] = (number of times x[i,] is observed)/(total number of observations).
This function is called by mlelcd
in order to compute
the maximum likelihood estimator when the observed data values are not
distinct. In this case, the log likelihood function is of the form
w_1 log f(X_1), ..., w_m log f(X_m),
where the sum is over distinct observations.
lcd.getweights
is deprecated, but retained for compatibility
with previous versions.
xout |
A matrix containing the distinct rows of the input
matrix x |
w |
A real-valued vector of weights as described above |
Madeleine Cule mlc40@cam.ac.uk
Robert Gramacy
Richard Samworth
## simple normal example x <- matrix(rnorm(200),ncol=2) tmp <- getweights(x) lcd <- mlelcd(tmp$x,tmp$w) plot(lcd,type="ic")