Skip to content
Prev 323092 / 398502 Next

pR2 stumped

On Mon, 6 May 2013, ivo welch wrote:

            
pscl:::pR2.polr calls update(object, ~ 1) to obtain the fitted 
log-likelihood of the null model (intercept only). If the calls are nested 
deeply enough, re-evaluating the model call does not work because it 
happens in the wrong environment.

A workaround could be to do the updating within your summarize() function 
directly and then call pscl:::pR2Work(llh, llhNull, n) directly. Or if you 
really just need the McFadden pseudo R-squared, it is then probably 
simplest to compute 1 - llh/llhNull yourself...

Best,
Z