<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cox-Snell R2 in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184172#M40338</link>
    <description>Thank you Mark. works perfect.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Mar 2019 12:36:54 GMT</pubDate>
    <dc:creator>ron_horne</dc:creator>
    <dc:date>2019-03-06T12:36:54Z</dc:date>
    <item>
      <title>Cox-Snell R2</title>
      <link>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184128#M40334</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am estimating a logistic regression and need to get the&amp;nbsp;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;SPAN style="font-size: medium;"&gt;Cox-Snell&amp;nbsp;&lt;I&gt;R&lt;/I&gt;&lt;SUP&gt;2&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; is it hiding anywhere or do i have to calculate it manually? does anyone have the script handy?&lt;/P&gt;
&lt;P&gt;JMP only gives me the McFadden and Nagelkerke by default.&lt;/P&gt;
&lt;P&gt;these are the definitions i am following:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/other/mult-pkg/faq/general/faq-what-are-pseudo-r-squareds/" target="_blank" rel="noopener"&gt;https://stats.idre.ucla.edu/other/mult-pkg/faq/general/faq-what-are-pseudo-r-squareds/&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you!&lt;/P&gt;
&lt;P&gt;Ron&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 11:04:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184128#M40334</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2019-03-06T11:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cox-Snell R2</title>
      <link>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184169#M40335</link>
      <description>&lt;P&gt;You will have to calculate it from the results presented in the Whole Model Test report using the formula that you cited. I don't know of a script for this calculation, but you could search the File Exchange area of this Community. I don't know if a script is necessary. The formula is pretty simple.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 11:42:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184169#M40335</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-03-06T11:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cox-Snell R2</title>
      <link>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184170#M40336</link>
      <description>&lt;P&gt;The script is not too bad after all. This example shows one way that you could do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// example case: Big Class
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// fit binary logistic model
lr = dt &amp;lt;&amp;lt; Fit Model(
	Y( :sex ),
	Effects( :age, :height, :weight ),
	Personality( "Nominal Logistic" ),
	Run( Likelihood Ratio Tests( 1 ), Wald Tests( 0 ) )
);

// access Whole Model Test report
lr rep = (lr &amp;lt;&amp;lt; Report)["Whole Model Test"];

// obtain likelihood for reduced and full models
L intercept = Exp( -(lr rep[NumberColBox(1)] &amp;lt;&amp;lt; Get( 3 )) );
L full      = Exp( -(lr rep[NumberColBox(1)] &amp;lt;&amp;lt; Get( 2 )) );
N           = lr rep[NumberColBox(8)] &amp;lt;&amp;lt; Get( 1 );

// compute Cox-Snell R square
r sqr cs    = 1 - (L intercept/L full)^(2/N);

// copy original report
label = lr rep[StringColBox(2)] &amp;lt;&amp;lt; Insert Row( 2, { "RSquare (C-S)" } ) &amp;lt;&amp;lt; Clone Box;
r sqr u = lr rep[NumberColBox(5)] &amp;lt;&amp;lt; Get( 1 );
aicc    = lr rep[NumberColBox(6)] &amp;lt;&amp;lt; Get( 1 );
bic     = lr rep[NumberColBox(7)] &amp;lt;&amp;lt; Get( 1 );

// replace with new report
lr rep[Tablebox(2)] &amp;lt;&amp;lt; Delete;
lr rep &amp;lt;&amp;lt; Append(
	TableBox(
		label,
		Number Col Box( "", { r sqr u, r sqr cs, aicc, bic, N } )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2019 12:27:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184170#M40336</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-03-06T12:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cox-Snell R2</title>
      <link>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184172#M40338</link>
      <description>Thank you Mark. works perfect.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Mar 2019 12:36:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Cox-Snell-R2/m-p/184172#M40338</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2019-03-06T12:36:54Z</dc:date>
    </item>
  </channel>
</rss>

