ipd2diag {diagmeta} R Documentation

## Individual participant data to enter them into diagmeta

### Description

Function to transform individual patient data (IPD) to enter them into diagmeta

### Usage

ipd2diag(studlab, value, status)


### Arguments

 studlab A vector with study labels value A vector with individual patients' measurements of a discrete or continuous variable status A vector with information of the individual's status (0 = non-diseased, 1 = diseased)

### Value

A data frame with values that can be entered into diagmeta.

### Author(s)

Gerta RÃ¼cker gerta.ruecker@uniklinik-freiburg.de, Srinath Kolampally kolampal@imbi.uni-freiburg.de

diagmeta, plot.diagmeta, print.diagmeta, summary.diagmeta

### Examples

# Simulate IPD data for three studies, each with 30 patients based
# on normally distributed marker values
#
set.seed(20)
k <- 3
n <- 60
m <- c(20, 23, 26)
d <- 10
s <- 5
studlab <- c(rep(1, n), rep(2, n), rep(3, n))
status <- rep(c(rep(0, n / 2), rep(1, n / 2)), k)
measurement <- c(rnorm(n / 2, m[1], s), rnorm(n/2, m[1] + d, s),
rnorm(n / 2, m[2], s), rnorm(n/2, m[2] + d, s),
rnorm(n / 2, m[3], s), rnorm(n/2, m[3] + d, s))
#
IPDdata <- data.frame(studlab, measurement, status)
str(IPDdata)

# Transform these data using ipd2diag()
#
diagdata <- ipd2diag(studlab, value = measurement, status = status)
str(diagdata)

# Run diagmeta()
#
diag1 <- diagmeta(TP, FP, TN, FN, cutoff, studlab,
data = diagdata,
distr = "normal")
summary(diag1)
plot(diag1)
par(mfrow = c(1, 2))
plot(diag1, which = "ROC", lines = TRUE)
plot(diag1, which = "SROC", ciSens = TRUE,
ciSpec = TRUE, lines = TRUE, shading = "hatch")



[Package diagmeta version 0.5-1 Index]