http://nl.mathworks.com/matlabcentral/newsreader/view_thread/319334
MATLAB Central Newsreader  scatter plot of raw data from mnrfit()
Feed for thread: scatter plot of raw data from mnrfit()
enus
©19942017 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://nl.mathworks.com/images/membrane_icon.gif

Fri, 20 Apr 2012 11:05:27 +0000
scatter plot of raw data from mnrfit()
http://nl.mathworks.com/matlabcentral/newsreader/view_thread/319334#874293
Céldor
Hi All,<br>
<br>
I have estimated regression model from mnrfit() and draw cumulative probability curves which works all right for me. I would like to see which points these curves are estimated from. Is it possible? It is not straight forward to me because as inputs I provide x continuous variable and y categorical variable with categories 15. How can I draw these points? What I want is equivalence of linear regression when I put data from which I estimate regression. In terms of ordinal probit model I get curves representing cumulative probabilities and I cannot use straight data I have estimated curves from.<br>
<br>
For instance if I have <br>
[B D S] = mnrfit(x,y,'model','ordinal','link','probit');<br>
and<br>
[P PL PH] = mnrval(B,x,'type','cumulative','model','ordinal','link','probit');<br>
<br>
can I use simply P(:,cat) + S.resid(:,cat)? Where are the values the curves were estimated from ? 'cat' is category of my interest?<br>
<br>
Please can someone help with that?

Tue, 24 Apr 2012 08:12:07 +0000
Re: scatter plot of raw data from mnrfit()
http://nl.mathworks.com/matlabcentral/newsreader/view_thread/319334#874676
Céldor
"Céldor " <zebik@op.pl> wrote in message <jmrftn$3u1$1@newscl01ah.mathworks.com>...<br>
> Hi All,<br>
> <br>
> I have estimated regression model from mnrfit() and draw cumulative probability curves which works all right for me. I would like to see which points these curves are estimated from. Is it possible? It is not straight forward to me because as inputs I provide x continuous variable and y categorical variable with categories 15. How can I draw these points? What I want is equivalence of linear regression when I put data from which I estimate regression. In terms of ordinal probit model I get curves representing cumulative probabilities and I cannot use straight data I have estimated curves from.<br>
> <br>
> For instance if I have <br>
> [B D S] = mnrfit(x,y,'model','ordinal','link','probit');<br>
> and<br>
> [P PL PH] = mnrval(B,x,'type','cumulative','model','ordinal','link','probit');<br>
> <br>
> can I use simply P(:,cat) + S.resid(:,cat)? Where are the values the curves were estimated from ? 'cat' is category of my interest?<br>
> <br>
> Please can someone help with that?<br>
<br>
Could someone please confirm whether it is possible or not? Thanks

Tue, 24 Apr 2012 12:52:58 +0000
Re: scatter plot of raw data from mnrfit()
http://nl.mathworks.com/matlabcentral/newsreader/view_thread/319334#874703
Peter Perkins
There are examples right in the documentation that are as close to this <br>
as I am aware of.<br>
<br>
<a href="http://www.mathworks.com/help/toolbox/stats/mnrfit.html">http://www.mathworks.com/help/toolbox/stats/mnrfit.html</a><br>
<br>
The examples in the doc have a single predictor x that takes on integer <br>
values. Even for a simple linear regression, it is not a simple matter <br>
to plot versus multiple predictor variables. With MN response, you have <br>
the added difficulty of (probably) needing to bin the data with respect <br>
to the predictor variable(s) unless it is already discrete.<br>
<br>
Hope this helps.<br>
<br>
<br>
On 4/20/2012 7:05 AM, Céldor wrote:<br>
> Hi All,<br>
><br>
> I have estimated regression model from mnrfit() and draw cumulative<br>
> probability curves which works all right for me. I would like to see<br>
> which points these curves are estimated from. Is it possible? It is not<br>
> straight forward to me because as inputs I provide x continuous variable<br>
> and y categorical variable with categories 15. How can I draw these<br>
> points? What I want is equivalence of linear regression when I put data<br>
> from which I estimate regression. In terms of ordinal probit model I get<br>
> curves representing cumulative probabilities and I cannot use straight<br>
> data I have estimated curves from.<br>
><br>
> For instance if I have [B D S] =<br>
> mnrfit(x,y,'model','ordinal','link','probit');<br>
> and<br>
> [P PL PH] =<br>
> mnrval(B,x,'type','cumulative','model','ordinal','link','probit');<br>
><br>
> can I use simply P(:,cat) + S.resid(:,cat)? Where are the values the<br>
> curves were estimated from ? 'cat' is category of my interest?<br>
><br>
> Please can someone help with that?