New to R and fairly new to statistics - appreciate any input.
In short, I'm trying to develop a predictive regression model but after fitting the model on training data, the output for my testing data shows far less variance than expected.
Below are images of the output as well as the code. My sense is that I need to some run multiple simulations for each patient - but I'm not entirely sure that is the answer. Any help on the code or the approach would be appreciated.
summary(bin_model <- glm(BVAS ~ Days + ANCA, data = training, family = "poisson")) summary(zero_infl <- zeroinfl(BVAS ~ Days + ANCA, data = training)) vuong(bin_model, zero_infl) # zero-inflated wins out testing$BVAS_hat <- predict(zero_infl, newdata = testing) ggplot(testing, aes(x=Days)) + geom_point(aes(y=BVAS_hat), alpha = 0.5, position = position_jitter(h=0.02), color = "red") + geom_point(aes(y=BVAS), alpha = 0.5, position = position_jitter(h=0.02), color = "blue") + labs(x="Days", y="BVAS")
Blue = actual testing data Red = output