Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Binary Logistic Regression
Posted:
Apr 8, 2013 8:11 AM


Hey Phoebe! I am getting the same problem. Did you get the correct solution now? Please share.
"Phoebe " <phoebe_62@hotmail.co.uk> wrote in message <k1ij0v$5gt$1@newscl01ah.mathworks.com>... > Trying to perform binary logistic regression with one y and 3 x's. Code is as follows so far; > clear > x1=[....]; > x2=[....]; > x3=[....]; > xfull=[x1 x2 x3]; > y=[0 1 0 ...etc]; > [bfull,devfull]=glmfit(xfull,y,'binomial','link','logit'); > n1=sum(y); > n=size(y,1); > n0=nn1; > G=2*(n1*log(n1)+n0*log(n0)n*log(n)  dev); > pval=1  chi2cdf(G,3) > bfull > devfull > n1 > n > n0 > G > pval > > I have a few queries; > 1. Matlab says my y must be a 2 column matrix or a vector which it is inputted as so i dont know why it doesnt recognise this? > 2. Within the pval equation it refers to (G,3) although in some cases this number is a 1 not a 3?


Date

Subject

Author

4/8/13


Guest

4/8/13


Tom Lane


