[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mixed-models
Subject:    Re: [R-sig-ME] mixed-effects ordinal logistic regression model
From:       Malcolm Fairbrother <malcolm.fairbrother () umu ! se>
Date:       2018-06-25 10:39:03
Message-ID: 88B88973-6899-4114-BB1D-3642803BA1C2 () umu ! se
[Download RAW message or body]

Hi Ahmad,
Well I assume you'll want random intercepts for animal, which is the "random = \
~animal" part of the code. In either a Bayesian or frequentist framework, I don't \
think you should try to estimate a variance for a random classification with only \
three unique values. This sort of question comes up frequently on this list, and \
pretty much everybody agrees that you need an N of about 10 at the very least, and \
probably more in most situations. If you search the list archives, you'll find a \
variety of discussions about this issue. Best wishes,
Malcolm



On 25 Jun 2018, at 11:59, ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au> wrote:

Hi Malcom

Thanks for this,
So, if I use the Bayesian method- I don't need to be concerned about the \
random-effects. What about in a frequentist framework, do you believe site (n=3) \
should be included as a random-effects?

Ahmad


From: Malcolm Fairbrother \
                <malcolm.fairbrother@umu.se<mailto:malcolm.fairbrother@umu.se>>
Sent: Monday, 25 June 2018 7:41 PM
To: ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>
Cc: r-sig-mixed-models@r-project.org
Subject: Re: [R-sig-ME] mixed-effects ordinal logistic regression model

Hi Ahmad,

If you're willing to work in a Bayesian framework, and use a probit rather than logit \
model, you may have some luck with something like:

library(MCMCglmm)

prior1 <- list(R=list(V=1, fix=1), G = list(G1 = list(V=1, nu=0.02)))

mod <- MCMCglmm(lesions ~ treatment + site + day, random = ~animal, data=yourdata, \
family="threshold", prior=prior1)

summary(mod)

The package course notes may help:
https://cran.r-project.org/web/packages/MCMCglmm/vignettes/CourseNotes.pdf

To me, it would make sense to make site and day (like treatment) categorical \
variables. So you treat site as a fixed effect.

Hope that helps,
Malcolm


Date: Mon, 25 Jun 2018 19:11:03 +1000
From: <ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>>
To: "'Trevor Walker'" \
<trevordaviswalker@gmail.com<mailto:trevordaviswalker@gmail.com>>, \
                <r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>>
                
Subject: Re: [R-sig-ME] R-sig-mixed-models Digest, Vol 138, Issue 34

Hi Paul/Trever

Thanks for these, much appreciated!
I will try these to see which one works, and how the outputs can be
interpreted.


Ahmad



-----Original Message-----
From: R-sig-mixed-models \
<r-sig-mixed-models-bounces@r-project.org<mailto:r-sig-mixed-models-bounces@r-project.org>> \
On Behalf Of Trevor Walker
Sent: Monday, 25 June 2018 11:53 AM
To: r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
Subject: Re: [R-sig-ME] R-sig-mixed-models Digest, Vol 138, Issue 34

Try googling "Cumulative link mixed model".

I have had success with the clm and clmm functions in the ordinal package.

-Trevor

On Sun, Jun 24, 2018 at 6:00 AM, \
<r-sig-mixed-models-request@r-project.org<mailto:r-sig-mixed-models-request@r-project.org>>
 wrote:


Send R-sig-mixed-models mailing list submissions to
       r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>

To subscribe or unsubscribe via the World Wide Web, visit
       https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
or, via email, send a message with subject or body 'help' to
       r-sig-mixed-models-request@r-project.org<mailto:r-sig-mixed-models-request@r-project.org>


You can reach the person managing the list at
       r-sig-mixed-models-owner@r-project.org<mailto:r-sig-mixed-models-owner@r-project.org>


When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-mixed-models digest..."


Today's Topics:

  1. mixed-effects ordinal logistic regression model
     (ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>)
  2. Re: mixed-effects ordinal logistic regression model
     (Paul Buerkner)

----------------------------------------------------------------------

Message: 1
Date: Sat, 23 Jun 2018 23:04:44 +1000
From: <ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>>
To: <r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>>
Subject: [R-sig-ME] mixed-effects ordinal logistic regression model
Message-ID: <002501d40af2$c282c360$47884a20$@tpg.com.au<mailto:002501d40af2$c282c360$47884a20$@tpg.com.au>>
                
Content-Type: text/plain; charset="utf-8"

Hi list



I have a dataset with n=60 animals with two groups (30/group; control
and
treatment) on 3 different research sites. Animals are monitored on
days 0,
14 and 28 (repeated measures), and lesions are scored from 1-4.



I want to use a mixed-effects ordinal logistic regression model and
consider animals and research sites as random-effects in the model.

I haven't done ordinal logistic regression before, and I would like to
use this data and learn how to do the analysis and also interpret the
outputs.

I
appreciate any help on;



1- A book, paper or link on ordinal logistic regression (easy to read
and understand for an average reader)

2- What is the preferred package in R to analyse such data? I noticed
some have used "Ordinal" package.

3- Is it appropriate to use farm (n=3) as a random-effects in the
model? I assume 3 is small to be considered as a random-effects in the
model, your thoughts?

4- Because observations are repeated on 3 occasions (repeated
measures), I intend to use animals as a random-effects.

5- If I use both research sites and animals as random-effects, I
assume it would be a nested random-effects model?

6- I appreciate if someone can help with some R codes on ordinal
logistic regression



Your help is greatly appreciated!



Ahmad










       [[alternative HTML version deleted]]




------------------------------

Message: 2
Date: Sat, 23 Jun 2018 15:30:41 +0200
From: Paul Buerkner <paul.buerkner@gmail.com<mailto:paul.buerkner@gmail.com>>
To: ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>
Cc: r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
Subject: Re: [R-sig-ME] mixed-effects ordinal logistic regression
       model
Message-ID:
       <CAGoSky___sd0xhDeEakt+J0SORs2gUnO_0v_qK_OQY8y-tg=Pw@
mail.gmail.com<http://mail.gmail.com/>>
Content-Type: text/plain; charset="utf-8"

Hi Ahmad,

if you want to fit this model in a frequentist framework, I recommend
the "ordinal" package. If you rather want to use a Bayesian framework,
I recommend "brms". For a tutorial paper about ordinal models also
containing R code for brms, see https://psyarxiv.com/x8swp/

Paul

2018-06-23 15:04 GMT+02:00 <ahmadr215@tpg.com.au<mailto:ahmadr215@tpg.com.au>>:


Hi list



I have a dataset with n=60 animals with two groups (30/group;
control and
treatment) on 3 different research sites. Animals are monitored on
days
0,

14 and 28 (repeated measures), and lesions are scored from 1-4.



I want to use a mixed-effects ordinal logistic regression model and
consider animals and research sites as random-effects in the model.

I haven't done ordinal logistic regression before, and I would like
to
use

this data and learn how to do the analysis and also interpret the
outputs.

I
appreciate any help on;



1- A book, paper or link on ordinal logistic regression (easy to
read and understand for an average reader)

2- What is the preferred package in R to analyse such data? I
noticed
some

have used "Ordinal" package.

3- Is it appropriate to use farm (n=3) as a random-effects in the model?
I

assume 3 is small to be considered as a random-effects in the model,
your thoughts?

4- Because observations are repeated on 3 occasions (repeated
measures),
I

intend to use animals as a random-effects.

5- If I use both research sites and animals as random-effects, I
assume
it

would be a nested random-effects model?

6- I appreciate if someone can help with some R codes on ordinal
logistic regression



Your help is greatly appreciated!



Ahmad


	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic