###################### # Generic Inputs # ###################### #Current Dataset trials<-unique(dataset$trialnr) n = length(dataset$trial[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))]) #Sample size of current dataset y = dataset$os[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))] #Follow-up times, vector of length n delta = as.numeric(dataset$osi[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))])-1 #Event Indicators, vector of length n p = 1 #Number of baseline covariates or # of columns in X below X = matrix(cbind(dataset$age[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))],as.numeric(dataset$sex[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))])),ncol=p,nrow=n) #Baseline Covariates in both datasets, n x p matrix X = matrix(dataset$age[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))],ncol=p,nrow=n) #Baseline Covariates in both datasets, n x p matrix q = 1 #Number of novel exposures or # of columns in Z below Z = matrix(dataset$Intervention[as.numeric(dataset$trial)==max(as.numeric(dataset$trial))],ncol=q,nrow=n) #Exposures only in current dataset, n x q matrix #Historical Dataset n0 = length(dataset$trial[as.numeric(dataset$trial)