Skip to content

Different Sampling time for different ID's #558

Answered by billdenney
OmarAshkar asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not certain that I understand the question. If I'm interpreting it correctly, you're wanting to have a different observation time for each subject. If so, you can choose which times to assign to each subject randomly with the following code. Any other way that you want to choose the id to time mapping should work similarly:

library(tidyverse)
library(rxode2)
#> rxode2 2.0.13.9000 using 8 threads (see ?getRxThreads)
#>   no cache: create with `rxCreateCache()`

# This will have same time for all individuals
ev <- eventTable(time.units="hours") %>%
  add.sampling(0:24) %>% 
  et(id = 1:4)
ev
#> ── EventTable with 100 records ──
#> 0 dosing records (see x$get.dosing(); add with add.dosin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OmarAshkar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants