PestSci[1:5,] # displaying first 5 rows in the data set
str(PestSci) # compactly displaying the structure of the PestSci object
## Analysis accounting for variance heterogeneity
## using Box-Cox-transformation
model1 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, boxcox=TRUE)
summary(model1)
## note: some estimates have indeterminate estimated standard error
model2 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, boxcox=TRUE,
control=mdControl(bcAdd=0.05))
summary(model2)
## note: now all estimates have estimated standard errors
## Analysis accounting for variance heterogeneity using variance modelling
model3 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, varPower=TRUE)
summary(model3)
## The same model in specified in 4 ways (first 3 with same parameterisation)
model4 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci)
model5 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, collapse=data.frame(CURVE,CURVE,CURVE,CURVE))
model6 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci,
collapse=list(~factor(CURVE)-1,~factor(CURVE)-1,~factor(CURVE)-1,~factor(CURVE)-1))
model7 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci,
collapse=list(~factor(CURVE),~factor(CURVE),~factor(CURVE),~factor(CURVE)))
rm(model1, model2, model3, model4, model5, model6, model7)
Run the code above in your browser using DataLab