I would like to generate a ROC curve to be able to assess the goodness of fit of a logistic regression model I just fitted using glmfit.
I have "yfit" as a column vector (length n), giving me the counts of items predicted as being in the 'positive' state by the model according to a continuous explanatory variable X (n values); Obviously "yobs" the actual counts of buildings - same vector characteristics as above.
However, perfcurve requires as input the individual cases, so if I understand correctly for each value of my continuous variable Xi (1<=i<=n), I would need to create a matrix of individual cases with 'labels' being my true class labels positive or negative, the scores or probabilities of being positive, and the posclass (i.e. positive) It seems very long and impractical given that I already have counts.
Is there any way I can work directly with the total counts, both actual and predicted, for each Xi to generate the ROC curve instead of having to redecompose into individual instances? with this function or another one?
PS. I already tried to generated the rOC curve "by hand" using my counts rates but without success.