getweights {LogConcDEAD} | R Documentation |
Find appropriate weights for likelihood calculations
Description
This function takes takes a matrix
of (possibly
binned) data and returns a matrix
containing the distinct
observations, and a vector
of weights as described below.
Usage
getweights(x)
Arguments
x |
a data |
Details
Given an
matrix
of points in
, this function removes duplicated observations, and
counts the number of times each observation occurs. This is used to
compute a
vector
such that
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
where the sum is over distinct observations.
Value
xout |
A |
w |
A real-valued |
Author(s)
Madeleine Cule
Robert Gramacy
Richard Samworth
See Also
Examples
## simple normal example
x <- matrix(rnorm(200),ncol=2)
tmp <- getweights(x)
lcd <- mlelcd(tmp$x,tmp$w)
plot(lcd,type="ic")