## Load the Switzerland data
data(Switzerland)
## Fit the FG DImodel, with factors density and treatment, and with theta = 1
m1 <- DI(y = "yield", density = "density", prop = 4:7, treat = "nitrogen",
FG = c("G","G","L","L"), DImodel = "FG", data = Switzerland)
summary(m1)
## Fit the FG DImodel, with factors density and treatment, and theta estimated
m2 <- update_DI(m1, estimate_theta = TRUE)
summary(m2)
## Fit the FULL DImodel, with factors density and treatment, and theta estimated
m3 <- update_DI(m1, DImodel = "FULL", estimate_theta = TRUE)
summary(m3)
Run the code above in your browser using DataLab