simulatemissings {compositions} | R Documentation

## Artifical simulation of various kinds of missings

### Description

This is a simulation mechanism to check the missing technique. It just generates additional missings of the various types in a given dataset.

### Usage

    simulateMissings(x,detectionlimit=NULL,
         knownlimit=FALSE,MARprob=0.0,MNARprob=0.0,
         mnarity=0.5,SZprob=0.0)

### Arguments

`x` | a dataset that should get the missings
`detectionlimit` | the detection limit described in `clo`, to impose an artificial detection limit
`knownlimit` | a boolean indicating wether the actual detection limit is still known in the dataset.
`MARprob` | the probability of occurence of 'Missings At Random' values
`MNARprob` | the probability of occurrence of 'Missings Not At Random'. The tendency is that small values have a higher probability to be missed.
`mnarity` | a number between 0 and 1 giving the strength of the influence of the actual value in becoming a MNAR. 0 means a MAR like behavior and 1 means that it is just the smallest values that is lost
`SZprob` | the probability to obtain a structural zero. This is done at random like a MAR.

### Details

Without any additional parameters no missings are generated. The procedure to generate MNAR affects all variables.

### Value

A dataset like `x` but with some additional missings.

### Author(s)

K.Gerald van den Boogaart

### References

See compositions.missings for more details.

### See Also

compositions.missings

### Examples

    data(SimulatedAmounts)
    x <- acomp(sa.lognormals)
    xnew <- simulateMissings(x,detectionlimit=0.05,MAR=0.05,MNAR=0.05,SZ=0.05)
    xnew
    plot(missingSummary(xnew))

[Package compositions version 0.91-6 Index]