lcd.getweights {LogConcDEAD}R Documentation

Given a matrix of data, find how many times each occurs

Description

This function takes takes a matrix of binned data and returns a matrix containing the distinct observations and a vector of weights

Usage

 lcd.getweights(x) 

Arguments

x a data matrix

Details

This function is very simple: if we have some data where not all the observations are distinct (due to e.g. finite precision observation), we can construct a vector of weights for use in computing the maximum likelihood estimator.

Value

x The distinct rows of the input matrix
w Weights: row i appears w_i times

Author(s)

Madeleine Cule mlc40@cam.ac.uk Robert Gramacy Richard Samworth

Examples

## simple normal example
set.seed(101)
x <- matrix(rnorm(200),ncol=2)
tmp <- lcd.getweights(x)
out <- lcd.mle(tmp$x,tmp$w)
plot(out,itype="ic")

[Package LogConcDEAD version 1.2-0 Index]