Closed VahidTehrani closed 6 years ago
Thanks for reporting @VahidTehrani. I'll take a look.
I think it's because currently the type
argument to predict
is not set as response
. Not great use-ability for this case, so I'll work on a better solution.
In the mean time:
library(zeligverse)
data(mid)
z.out1 <- zelig(conflict ~ major + contig + power + maxdem + mindem + years,
data = mid, model = "relogit", tau = 1042/303772)
# Extract fitted model object and predict response probabilities
fitted_model <- from_zelig_model(z.out1)
prob <- predict(fitted_model, type = "response")
max(sapply(prob, max))
min(sapply(prob, min))
From 971809eabd7448b2456b4917247bd1083fb1dd1f predict
accepts arguments (like type = "response"
)
Thanks! @christophergandrud
It looks something is not right in the
get_predict()
function.and return 0.9610796 as max and -10.59513 as min. Does it make sense? It supposed to be probability!! The link fucntion is 'logit'.