I have three predictor variables
A: binary (A = vector of length N containing 0 and 1)
B: three categories 1, 2, 3 (B = vector of length N containing 1,2 or 3)
C: continuous (C = vector of length N containing real, positive integers)
and one response variable
y: binary (y = vector of length N, where half entries are 0 and other half are 1).
Bcat = dummyvar(B);
Bcat = Bcat(:,2:3); % remove the first column
X = [A Bcat C];
b = glmfit(X,y,'binomial','link','logit');
So for a particular n (n=1..N) then the probability of y(n) being 1 is given by
eta = b(1) + X(n,1)*b(2) + X(n,2)*b(3) + X(n,3)*b(4) + X(n,4)*b(5);
Prob(n) = exp(eta)/(1+exp(eta));
But this gives a range around 0.5 for all values, where I would like it to be 1 where the initial input y vector stated it is 1 for certain.