if (FALSE) {
# Example provided by the prothrombin data
data("prothr")
# Apply Markov test to grid of monthly time points over the first 7.5 years
year <- 365.25
month <- year / 12
grid <- month * (1:90)
# Markov test for transition 1 (wild bootstrap based on 100 replications)
MT <- MarkovTest(prothr, id = "id", transition = 1,
grid = grid, B = 100)
plot(MT, grid, what="states", idx=1:50, states=rownames(attr(prothr, "trans")),
xlab="Days since randomisation", ylab="Log-rank test statistic",
main="Transition Normal -> Low")
plot(MT, grid,what="overall", idx=1:50,
xlab="Days since randomisation", ylab="Chi-square test statistic",
main="Transition Normal -> Low")
plot(MT, grid, what="states", quantiles=FALSE) # only trace
plot(MT, grid, what="states") # trace plus quantiles (default)
plot(MT, grid, what="states", idx=1:10) # trace plus quantiles, plus first 10 bootstrap traces
plot(MT, grid, what="overall", quantiles=FALSE) # only trace
plot(MT, grid, what="overall") # trace plus quantiles (default)
plot(MT, grid, what="overall", idx=1:10) # trace plus quantiles, plus first 10 bootstrap traces
}
Run the code above in your browser using DataLab