CenterForStatistics-UGent / pim

R package for probabilistic index models
9 stars 5 forks source link

When using identity link for k-sample design tests, offset is not added correctly. #17

Open JoFAM opened 6 years ago

JoFAM commented 6 years ago
> set.seed(17337656)
> wb<-data.frame(weight=c(runif(5),runif(5)+0.2,runif(5)+0.8),trt=c(rep("L",5),rep("M",5),rep("H",5)))
> 
> m <- pim(weight ~ trt,data = wb, link = "identity",  model="difference")
> summary(m)

should give the outcome of:

m <- pim(weight ~ trt + 1,data = wb, link = "identity",  model="difference", compare = "all")

This could be done by adding an offset argument for constructing the correct model matrix en response for fitting, or by automatically selecting compare = "all" in case link = identity and model = difference.