Sdata: Simulated Data

Description Format Details Author(s) Examples

Description

A simulated data-set used for the illustration of grouped for grouped data coming from a logit-normal distribution.

Format

A data frame with 250 observations on the following 4 variables:

lo

the lower limits of the response intervals.

up

the upper limits of the response intervals.

treat

the treatment indicator.

x

a continuous covariate.

Details

The data set has been produced with the code in the Examples below.

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
n <- 250
treat <- rbinom(n, 1, 0.5)
x <- runif(n, -4, 4)
mu <- 1 + 0.5 * treat -1 * x + 0.8 * treat * x
u <- plogis(rnorm(n, mu, 2))

index <- cbind(c(0, 0.25, 0.5, 0.75), c(0.25, 0.5, 0.75, 1)) 
a <- b <- numeric(n)
for(i in 1:n){
    ind <- which(index[, 2] - u[i] > 0)[1]
    a[i] <- index[ind, 1]
    b[i] <- index[ind, 2]
}
Sdata <- data.frame(lo = a, up = b, treat = factor(treat), x)

## End(Not run)

str(Sdata)
summary(Sdata)

grouped documentation built on May 2, 2019, 2:42 a.m.

Related to Sdata in grouped...