[R] constraining betas with mlogit package

Essers, Jonah Jonah.Essers at childrens.harvard.edu
Wed Aug 17 04:38:22 CEST 2011


Guys,
thanks for the input. These are numerical variables. Let me give more detail.

 want to test the likelihood of my data given a varying set of categorical outcomes given the data of a single observation (SNP) and 10 pre-defined principal components from population genetic experiments.
 
The saturated model will have three possible outcomes:  1 (reference) -vs- 2 and 3. 
I then want to test the likelihood of this dataset against the likelihood of two different collapsed and simpler set of outcomes: (A) 1 and 2 (reference) -vs- 3  or (B) 1 and 3 (reference) -vs- 2.  See the scheme below.

So, I will need to design the two simpler models to have the beta's for SNP be equal. 

SATURATED:

                OUTCOME    SNP  PCA1 PCA2 PCA3 PCA4 PCA5 PCA6 PCA7 PCA8 PCA9 PCA10
person 1         1               2       -0.2 -0.02   etc.......
person 2         2              1.22      -.8    .003  etc.....
person 3         3               0.2     .0003  .34 etc.....


SIMPLE MODEL 1 (collapsing 1 and 2):

                OUTCOME    SNP  PCA1 PCA2 PCA3 PCA4 PCA5 PCA6 PCA7 PCA8 PCA9 PCA10
person 1         1               2       -0.2 -0.02   etc.......
person 2         1               1.22      -.8    .003  etc.....
person 3         2               0.2      .0003  .34 etc.....


SIMPLE MODEL 2 (collapsing 1 and 3):

              OUTCOME    SNP  PCA1 PCA2 PCA3 PCA4 PCA5 PCA6 PCA7 PCA8 PCA9 PCA10
person 1         1               2       -0.2 -0.02   etc.......
person 2         2               1.22      -.8    .003  etc.....
person 3         1               0.2      .0003  .34 etc.....




________________________________________
From: Bert Gunter [gunter.berton at gene.com]
Sent: Monday, August 15, 2011 7:20 PM
To: Rolf Turner
Cc: Essers, Jonah; r-help at R-project.org
Subject: Re: [R] constraining betas with mlogit package

Hi Rolf:

Maybe. But I'm not sure whether the OP wants two levels of a single
variable to have the same coefficient, or two different categorical
variables in some way, or two different numeric variables, or...

Maybe it's obvious, but I thought it fairer to the OP to make clear
that I was not a reliable resource and that he needed to look
elsewhere. And perhaps clarify what he's after.

-- Bert

On Mon, Aug 15, 2011 at 4:13 PM, Rolf Turner <rolf.turner at xtra.co.nz> wrote:
> On 16/08/11 10:58, Bert Gunter wrote:
>>
>> Well, of course that doesn't work for categorical covariates (duhhh!)
>> -- so I'll just stop at my first clause, "I don't know." Sorry.
>>
>> I would suggest that a better specification of the model and the
>> constraints may elicit better and faster responses.
>
> I think you were essentially right the first time, Bert.  If you want
> two beta's to be the same, for a factor, you should just collapse
> those two levels of the factor into one.  Is it not so?
>
>    cheers,
>
>        Rolf
>>
>> -- Bert
>>
>> On Mon, Aug 15, 2011 at 3:53 PM, Bert Gunter<bgunter at gene.com>  wrote:
>>>
>>> I don't know the answer in general, but for the specific constraint of
>>> two coefficients being the same, I would assume that you should create
>>> a new covariate which is the sum of the two individual ones and fit
>>> this single combined covariate instead of the two separate ones.
>>>
>>> Cheers,
>>> Bert
>>>
>>> On Mon, Aug 15, 2011 at 2:20 PM, Essers, Jonah
>>> <Jonah.Essers at childrens.harvard.edu>  wrote:
>>>>
>>>> I have been using the mlogit package but can't seem to figure out how to
>>>> make constraints on the beta coefficients.
>>>> For example, I would like to force that two of my beta's are equal to
>>>> each other.
>>>>
>
>



--
"Men by nature long to get on to the ultimate truths, and will often
be impatient with elementary studies or fight shy of them. If it were
possible to reach the ultimate truths without the elementary studies
usually prefixed to them, these would not be preparatory studies but
superfluous diversions."

-- Maimonides (1135-1204)

Bert Gunter
Genentech Nonclinical Biostatistics



More information about the R-help mailing list