Reputation: 1673
I am not sure if my results can be trusted.
Let's say I fitted this model with informative priors:
library(rstanarm)
data <- iris[, c("Sepal.Length", "Petal.Width")]
model1 <- stan_glm(Sepal.Length ~ Petal.Width, data=iris, prior=normal(2, 3, autoscale=FALSE))
I would like, then, to update the model with standardized data, to see how standardization change the coefs.
model2 <- update(model1, data=as.data.frame(scale(iris)))
However, I am concerned that the results of model2 cannot be "trusted" as they might be wrongly (i.e., unwantedly) biased as they take into account the non-standardized priors set for model1.
Is there a way to "standardize" the priors so that I can pass them to the update
function so that the priors set of model1 are, mutatis mutandis, equivalent to those in model2?
Note: due to the nature of my analysis, I cannot avoid the use of update
.
Thanks a lot!
Upvotes: 2
Views: 182
Reputation: 4990
If you originally specify autoscale = FALSE
when you call normal
or some other prior function, and then try to update
with different or transformed data, I doubt the scale of the priors would be calibrated properly the second time. But if you specify autoscale = TRUE
, then it essentially scales the priors internally to be in standardized units, in which case updating with new data would be fine, although the internal rescaling would be different.
Upvotes: 1