Skip to content

Test of Parallel Regression Assumption in R

5 messages · Heather Kettrey, Bert Gunter, Jeff Newmiller +2 more

#
Heather:

You are at Vanderbilt, whose statistics department under Frank Harrell
is a veritable bastion of R and statistical wisdom. I strongly
recommend that you take a stroll over there in the lovely spring
weather and seek their help. I can't imagine how you could do better
than that!

Cheers,
Bert

On Mon, Mar 11, 2013 at 2:02 PM, Heather Kettrey
<heather.h.kettrey at vanderbilt.edu> wrote:

  
    
#
Perhaps you should be asking whether such an algorithm exists, regardless of whether it is already implemented in R. However, this is the wrong place to ask such theory questions... your local statistics expert might know, or you could ask on a statistics theory forum such as stats.stackexchange.com. With the answer to that question you could use the RSiteSeek function to search for references to that algorithm, or even implement it yourself.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Heather Kettrey <heather.h.kettrey at vanderbilt.edu> wrote:

            
#
Dear Heather,

You can make this test using the ordinal package. Here the function
clm fits cumulative link models where the ordinal logistic regression
model is a special case (using the logit link).

Let me illustrate how to test the parallel regression assumption for a
particular variable using clm in the ordinal package. I am using the
wine dataset from the same package, I fit a model with two explanatory
variables; temp and contact, and I test the parallel regression
assumption for the contact variable in a likelihood ratio test:
Loading required package: MASS
Loading required package: ucminf
Loading required package: Matrix
Loading required package: lattice
response rating temp contact bottle judge
1       36      2 cold      no      1     1
2       48      3 cold      no      2     1
3       47      3 cold     yes      3     1
4       67      4 cold     yes      4     1
5       77      4 warm      no      5     1
6       60      4 warm      no      6     1
Likelihood ratio tests of cumulative link models:

    formula:                nominal: link: threshold:
fm1 rating ~ temp + contact ~1       logit flexible
fm2 rating ~ temp           ~contact logit flexible

    no.par    AIC  logLik LR.stat df Pr(>Chisq)
fm1      6 184.98 -86.492
fm2      9 190.42 -86.209  0.5667  3      0.904

The idea is to fit the model under the null hypothesis (parallel
effects - fm1) and under the alternative hypothesis (non-parallel
effects for contact - fm2) and compare these models with anova() which
performs the LR test. From the high p-value we see that the null
cannot be rejected and there is no evidence of non-parallel slopes in
this case. For additional information, I suggest that you take a look
at the following package vignette
(http://cran.r-project.org/web/packages/ordinal/vignettes/clm_tutorial.pdf)
where these kind of tests are more thoroughly described starting page
6.

I think you can also make similar tests with the VGAM package, but I
am not as well versed in that package.

Hope this helps,
Rune

Rune Haubo Bojesen Christensen
Postdoc
DTU Compute - Section for Statistics
---------------------------------------------------
Technical University of Denmark
Department of Applied Mathematics and Computer Science
Richard Petersens Plads
Building 324, Room 220
2800 Lyngby
Direct +45 45253363
Mobile +45 30264554
http://www.imm.dtu.dk
On 11 March 2013 22:52, Nicole Ford <nicole.ford at me.com> wrote: