Description Usage Arguments Details Value Examples
View source: R/censor_functions.R
This function will take a data set and artificially left censor it to a requested level of censoring.
1 | censorData(uncenData, cenLevelVec)
|
uncenData |
Data matrix to be censored. |
cenLevelVec |
Vector of length equal to rows of data, indicating censoring level requested in decimals. |
The function sets the limit of detection at the value which the requested amount of data is below. All values below this limit of detection are replaced with the limit of detection.
Matrix such that the first half of the columns are the censored data and the second haf are the isCensored flags with 1 indicating censored and 0 indicating not censored, where censored data has a value equal to the limit of detection.
1 2 3 4 5 6 7 8 9 | xmu = 0
ymu = 0
xsd = 1
ysd = 1
r = 0
df = Inf #normal
scaleMat <- buildScaleMat( xsd, ysd, r, df)
myData <- genData(10, c(xmu, ymu), scaleMat, df)
censorData(uncenData = myData, cenLevelVec =c(.2,.2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.