monotone.pattern: Transform data with nonmontone pattern to monotone pattern...

View source: R/monotone.pattern.R

monotone.patternR Documentation

Transform data with nonmontone pattern to monotone pattern with missing observations

Usage

monotone.pattern(measurements, dataset, id=NULL, transform=TRUE, threshold=0.05, ...)

Arguments

measurements

The ordered sequence of the variables of the interest including the outcome.

data

Data.

id

If data variable of id.

transform

If it is equal to TRUE* then all records following a nonmontone are set to follow a monotone pattern. *If it is equal to FALSE* then all records following a nonmontone are remain the same.

threshold

Remove pattern of from the monoene missingness if the percent of specific records is below the threshold

...

Value

data

Data.

transformnb

Contain the position of the record in data if the record follows a nonmontone pattern. (If transform=TRUE).

tableC

The number of the observed variables in integers. See the function **missing.pattern**. (If transform=TRUE).

tableCpercent

The percent of the observed variables. (If transform=TRUE).

threshold

The value of the threshold. (If transform=TRUE).

datasetredu

The records are removed from data if there are to few records of a specific pattern below the threshold. (If transform=TRUE).

tableCredu

The number of the observed variables in integers for the reduced data. See the function **missing.pattern**. (If *transform=TRUE*).

tableCpercentredu

The percent of the observed variables for the reduced data. (If transform=TRUE).

nonmonotone

Contain the position of the record in data if the record follows a nonmontone pattern. (If transform=FALSE)

Author(s)

Thomas Maltesen thomas.maltesen@protonmail.com

See Also

See also DatawMis.

Examples

## Not run: 
DataSetnonMonotone.extra<-
lapply(1:loop,function(iiii)
       monotone.pattern(measurements=c("L0","A0","L1","A1","L2","A2","Y"),
                        data=DataSetnonMonotone[[iiii]],
                        id=NULL,
                        transform=TRUE,
                        threshold=0.05))

listMean(lapply(1:loop,function(iiii)length(DataSetnonMonotone.extra[[iiii]]$transformnb)))
  926.57

## End(Not run)

mcl868/causalinmisdata documentation built on March 5, 2024, 8:22 a.m.