data(Arterial)
carrydata <- createCarry(data=Arterial, treatment = "Treatment",
period = "Period",id="Subject", carrySimple = FALSE)
data <- carrydata$data
carry <- carrydata$carryover
model1 <- CrossGEESP(response = "Pressure", treatment = "Treatment",
period = "Period", id="Subject", time="Time",
carry=carrydata$carryover,data=data,
correlation = "exchangeable")
model2 <- CrossGEESP(response = "Pressure", treatment = "Treatment",
period = "Period", id="Subject", time="Time",
carry=carrydata$carryover,data=data, correlation = "AR-M")
model1$QIC
model2$QIC
summary(model1$model)
summary(model2$model)
## Aproximate p-values for model 2
(pvalues <- 2 * pnorm(abs(coef(summary(model2$model))[,5]), lower.tail = FALSE))
model1$graph[[1]]
model1$graph[[2]]
plot <- model1$graph[[1]] + ggplot2::xlab("Time in minutes")+
ggplot2::ylab("Change in systolic blood pressure")
plot
Run the code above in your browser using DataLab