From: Luca Di Simone on
I am performing a probit regression without constant in order to compute the mcfadden r-square:

[bintercept dev stat]=glmfit(x,[y n],'binomial','probit')

I define the array x without regressors in this way:

x=zeros(size(y,1),0)

but the function glmfit give me this message:

"??? Error using ==> unknown
Matrix dimensions must agree.

Error in ==> glmfit>wfit at 280
xw = x .* sw(:,ones(1,c));

Error in ==> glmfit at 169
[b,R] = wfit(z - offset, x, w);"

otherwise, I could change the options of glmfit fucntion to exclude the constant, but I do not know the exact syntax and my attempts were wrong. What is the correct syntax in the function to remove the constant?

thanks for your help

Luca
From: Peter Perkins on
Luca Di Simone wrote:

> otherwise, I could change the options of glmfit fucntion to exclude the constant, but I do not know the exact syntax and my attempts were wrong. What is the correct syntax in the function to remove the constant?

glmfit(ones(size(y),[y n],'binomial','link','probit','constant','off')
 | 
Pages: 1
Prev: QNX AND SIMULINK
Next: lsqnonlin Nan