peak <- tgrid(0,6,0.1)
sparse <- tgrid(0,24,6)
des1 <- c(peak,sparse)
des2 <- tgrid(0,72,4)
data <- expand.ev(ID = 1:10, amt=c(100,300))
data$GRP <- data$amt/100
idata <- data[,c("ID", "amt")]
mod <- mrgsolve::house()
mod %>%
  omat(dmat(1,1,1,1)) %>%
  carry_out(GRP) %>%
  idata_set(idata) %>%
  design(list(des1, des2),"amt") %>%
  data_set(data) %>%
  mrgsim() %>% 
  plot(RESP~time|GRP)
Run the code above in your browser using DataLab