Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.Perkins@MathRemoveThisWorks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: glmfit
Date: Wed, 04 Nov 2009 10:57:14 -0500
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <hcs88q$qgf$1@fred.mathworks.com>
References: <hcs7jq$dnp$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1257350234 27151 172.31.57.88 (4 Nov 2009 15:57:14 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 15:57:14 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
In-Reply-To: <hcs7jq$dnp$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:582424


Luca Di Simone wrote:
> I am working with glmfit to perform probit regressions. I want to regress my y on just a costant but the glmfit points out that the limit is reached.
> 
> My syntax is;
> [beta dev stat]=glmfit(x,[y n],'binomial','probit')
> 
> if x has not regressors, what's the function's input in place of x? and if the regression contains already a (default) constant, in such a case, how can I exclude the constant?

As the help says, 

>> help glmfit
 GLMFIT Fit a generalized linear model.
[snip]
       'constant' - specify as 'on' (the default) to include a constant
          term in the model, or 'off' to omit it.  The coefficient of the
          constant term is the first element of B.

Or you can do this:

   x = zeros(size(y,1),0)
   glmfit(x,[y n],'binomial','link','probit')

But why are you using GLMFIT if you don't have any predictor variables?  The only reason I can think of would be to compute some version of r-squared.