I'm not sure if this is a bug or if I'm making some silly mistake, but seems the argument transform.function in predictPlus is not backtransforming the predictions.
Here is a quick example:
library(asreml)
library(asremlPlus)
# fit a model
mod <- asreml(Yield ~ Variety, data = Oats.dat)
pred <- predictPlus(mod, classify = 'Variety')$predictions
# fit a model but with a transformed target
mod_trans <- asreml(sqrt(Yield) ~ Variety, data = Oats.dat)
pred_trans <- predictPlus(mod, classify = 'Variety', transform.function = 'sqrt')$backtransforms
pred == pred_trans
Variety predicted.value standard.error upper.Confidence.limit lower.Confidence.limit est.status
1 TRUE TRUE NA TRUE TRUE TRUE
2 TRUE TRUE NA TRUE TRUE TRUE
3 TRUE TRUE NA TRUE TRUE TRUE
As you can see, the backtransforms object is equal to the predictions (except for the standard.error column that was set to NA).
I'm not sure if this is a bug or if I'm making some silly mistake, but seems the argument
transform.function
inpredictPlus
is not backtransforming the predictions.Here is a quick example:
As you can see, the
backtransforms
object is equal to thepredictions
(except for thestandard.error
column that was set to NA).My session info: