Dear members, I work about dosage and some values are bellow the detection limit. I would like create new "numbers" like LDL (to represent lower than detection limit) and UDL (upper the detection limit) that behave like NA, with the possibility to test them using for example is.LDL() or is.UDL(). Note that NA is not the same than LDL or UDL: NA represent missing data. Here the data is available as LDL or UDL. NA is built in R language very deep... any option to create new version? of NA-equivalent ? Thanks Marc
Beyond known limits are left/right censored data. You need to use statistical methodology that handles censoring. See the survival package and the CRAN Survival task view for this -- or consult an appropriate expert. There are of course standard ways of annotating such data in these packages. Bert On Mon, Dec 20, 2021, 8:41 PM Marc Girondot via R-help <r-help at r-project.org> wrote:> Dear members, > > I work about dosage and some values are bellow the detection limit. I > would like create new "numbers" like LDL (to represent lower than > detection limit) and UDL (upper the detection limit) that behave like > NA, with the possibility to test them using for example is.LDL() or > is.UDL(). > > Note that NA is not the same than LDL or UDL: NA represent missing data. > Here the data is available as LDL or UDL. > > NA is built in R language very deep... any option to create new version > of NA-equivalent ? > > Thanks > > Marc > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
On 20/12/2021 11:41 p.m., Marc Girondot via R-help wrote:> Dear members, > > I work about dosage and some values are bellow the detection limit. I > would like create new "numbers" like LDL (to represent lower than > detection limit) and UDL (upper the detection limit) that behave like > NA, with the possibility to test them using for example is.LDL() or > is.UDL(). > > Note that NA is not the same than LDL or UDL: NA represent missing data. > Here the data is available as LDL or UDL. > > NA is built in R language very deep... any option to create new version > of NA-equivalent ? >There was a discussion of this back in May. Here's a link to one approach that I suggested: https://stat.ethz.ch/pipermail/r-devel/2021-May/080776.html Read the followup messages, I made at least one suggested improvement. I don't know if anyone has packaged this, but there's a later version of the code here: https://stackoverflow.com/a/69179441/2554330 Duncan Murdoch
On Tue, 21 Dec 2021 05:41:31 +0100 Marc Girondot via R-help <r-help at r-project.org> wrote:> Dear members, > > I work about dosage and some values are bellow the detection limit. I > would like create new "numbers" like LDL (to represent lower than > detection limit) and UDL (upper the detection limit) that behave like > NA, with the possibility to test them using for example is.LDL() or > is.UDL(). > > Note that NA is not the same than LDL or UDL: NA represent missing > data. Here the data is available as LDL or UDL. > > NA is built in R language very deep... any option to create new > version of NA-equivalent ? > > Thanks > > MarcYou are concerned with a distinct quality in the data with respect to a specific method. You might want to code a qualitative variable that defines the detectability state of the specific reading. Then filter on the state of interest, and as a means of establishing the quality of the method or the data, summarize the detection properties in your sample for the anaytical method employed. I had an engineer tell me flatly that the measures claimed in a paper were "impossible." The method used was already common, but his system was not sensitive enough. As far as the statistical properties go, there are measures that could be made and measures that could not be made. If a different method became available, you would probably still desire to either reanalyze the older data employing the new method, or append new measures where they were previously unavailable. Either way you encounter data range or compatibility issues that have to be addressed methodologically.