# NOT RUN {
# }
# NOT RUN {
#Set parameters to generate PIT transition matrices
startDate <- "2000-01-01"
endDate <- "2005-01-01"
method <- "cohort"
snapshots <- 4
interval <- .25
Example<-getPIT(data,startDate, endDate,method, snapshots, interval)
lstInit <- Example$lstInitVec[lapply(Example$lstInitVec,length)>0]
lstCnt <- Example$lstCntMat[lapply(Example$lstCntMat,length)>0]
ExampleTTC <- cohort.TTC(lstCnt,lstInit)
#use $ATMP from the cohort.TTC() as the input into the cohort.CI() function
transMatrix <- ExampleTTC$ATMP
initCount <- ExampleTTC$ACP[[1]][,1]
sim <- 1000
tolerance_Cohort <-cohort.CI(transMatrix,initCount,sim)
Example 2:
#Set parameters to generate PIT transition matrices
startDate <- "1997-01-01"
endDate <- "2002-01-01"
method <- "cohort"
snapshots <- 12
interval <- 1
Example<-getPIT(data,startDate, endDate,method, snapshots, interval)
lstInit <- Example$lstInitVec[lapply(Example$lstInitVec,length)>0]
lstCnt <- Example$lstCntMat[lapply(Example$lstCntMat,length)>0]
ExampleTTC <- cohort.TTC(lstCnt,lstInit)
#use $ATMP from the cohort.TTC() as the input into the cohort.CI() function
transMatrix <- ExampleTTC$ATMP
initCount <- ExampleTTC$ACP[[1]][,1]
sim <- 1000
tolerance_Cohort <-cohort.CI(transMatrix,initCount,sim)
# }
Run the code above in your browser using DataLab