Skip to content
Prev 682 / 885 Next

Histogram for Left Censored Data

You don?t really say what you want your histogram to be like.  How do you want to deal with the left censored values?  I?d probably use bins of unequal widths (and a density scale), choosing the left-most edge to be something sensible for your data (could these values be as low as 0? is some other cut-off reasonable?)

I?d also put the data into a data frame (not a matrix), but you don?t really need the second column if you take the approach I?m suggesting.

require(mosaic)  # this makes the histogram a density histogram by default
conc <- c(1450,1800,1840,1820,1860,1780,1760,1800,1900,1770,1790,1780,1850,1760,1450,1710,1575,1475,1780,1790,1780,1450,1790,1800)
histogram( ~ conc, breaks = c(1000, seq(1450, 2000, by = 25)))  # set 1000 to whatever value makes sense for your data.

r-help is a better place for this, and typically answers to well stated questions with reproducible R code setting them up are answered pretty promptly.  But neither list should be abused.  People answering are volunteers, not customer service.  They will answer if/when they choose to do so.

?rjp