exdatasets: Example input data sets

exdatasetsR Documentation

Example input data sets

Description

Example input data sets

Usage

data(exidata)

data(extran1)

data(extran2)

data(extran3)

data(exTheoph)

data(exBoot)

Details

  • exidata holds individual-level parameters and other data items, one per row

  • extran1 is a "condensed" data set

  • extran2 is a full dataset

  • extran3 is a full dataset with parameters

  • exTheoph is the theophylline data set, ready for input into mrgsolve

  • exBoot a set of bootstrap parameter estimates

Examples


mod <- mrgsolve::house() %>% update(end=240) %>% Req(CP)

## Full data set
data(exTheoph)
out <- mod %>% data_set(exTheoph) %>% mrgsim
out
plot(out)

## Condensed: mrgsolve fills in the observations
data(extran1)
out <- mod %>% data_set(extran1) %>% mrgsim
out
plot(out)

## Add a parameter to the data set
stopifnot(require(dplyr))
data <- extran1 %>% distinct(ID) %>% select(ID) %>%
  mutate(CL=exp(log(1.5) + rnorm(nrow(.), 0,sqrt(0.1)))) %>%
  left_join(extran1,.)
  
data

out <- mod %>% data_set(data) %>% carry_out(CL) %>%  mrgsim
out
plot(out)

## idata
data(exidata)
out <- mod %>% idata_set(exidata) %>% ev(amt=100,ii=24,addl=10) %>% mrgsim
plot(out, CP~time|ID)

metrumresearchgroup/mrgsolve documentation built on Feb. 13, 2024, 10:27 p.m.