I was trying to bring some of my R Code to Julia, but have a problem with the GLM Package. The dataset is grouped by age and in each group are m_i individuals from which N_i are sick. I want to estimate the probability of being sick as a function of age - a typical logistic regression problem. I R the code would look like:
fit <- glm(cbind(N, m - N) ~ age, family = binomial, data = heart)
I tried in Julia the following function call, but it does not work:
glm(@formula((N, m-N) ~ age), df, Binomial(), LogitLink())
Any ideas? The dataset could be found here: http://stat.ethz.ch/Teaching/Datasets/heart.dat
Thank you.