| TendrilPerm | R Documentation | 
Function to compute the permutations of one specified tendril, starting from a specific day. Permutations are simulated under the null hypothesis. Thus, on average, there will be an equal number of events on each treatment arm.
TendrilPerm(tendril, PermTerm, n.perm = 100, perm.from.day = 1, pi.low = 0.1, pi.high = 0.9)
tendril | 
 an object of class tendril as produced by Tendril()  | 
PermTerm | 
 the name of the type of event (tendril) to calculate permutations on  | 
n.perm | 
 the number of permutations. Default 100  | 
perm.from.day | 
 the starting day for the permutation calculations. Default 1  | 
pi.low | 
 percentile low value. Default 0.1  | 
pi.high | 
 percentile high value. Default 0.9  | 
Make permutation analysis to a specific type of event, as specified in PermTerm.
The function return an object of class TendrilPerm containing all the input data and a dataframe of permutation results. Use:
data$perm.data
and
data$tendril.pi
and
data$tendril
to access the permutations, percentiles dataframes, and tendril data respectively
# Create tendril
tendril <- Tendril(mydata = TendrilData,
  rotations = Rotations,
  AEfreqThreshold = 9,
  Tag = "Comment",
  Treatments = c("placebo", "active"),
  Unique.Subject.Identifier = "subjid",
  Terms = "ae",
  Treat = "treatment",
  StartDay = "day",
  SubjList = SubjList,
  SubjList.subject = "subjid",
  SubjList.treatment = "treatment"
)
# Compute permutations
perm.data <- TendrilPerm(tendril = tendril,
  PermTerm="AE40",
  n.perm = 200,
  perm.from.day = 1)
# Plot results
plot(perm.data)
plot(perm.data, percentile = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.