[ADMB Users] Integrating R and ADMB to generalize TPL files
H. Skaug
hskaug at gmail.com
Wed Nov 7 10:08:56 PST 2012
Hi,
Dave is right that the it is hard for the average user of glmmADMB to
understand the implication of the independence assumption. Maybe
the default should instead be to calculate a full covariance matrix,
i.e. we should change the default which currently is corStruct="diag".
Then the user must actively choose independence, and hopefully will think
through what it means.
Hans
On Wed, Nov 7, 2012 at 6:49 PM, dave fournier <davef at otter-rsch.com> wrote:
> On 12-11-07 09:29 AM, Ben Bolker wrote:
>>
>> On 12-11-07 11:58 AM, dave fournier wrote:
>>>
>>> Here is an example of why I dislike the R approach
>>> so much.
>>>
>>> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2012q4/019349.html
>>>
>>> I was curious to find out why introducing to additional parameters for
>>> the
>>> variance of the random effects would produce no improvement in the
>>> model. So first I wanted to run glmmadmb as seth had done.
>>>
>>> I put his data in a file and read it into R.
>>>
>>> Then I ran his model by grabbing his call to glmmadmb.
>>> I was surprised to see that I got a different result from Seth.
>>>
>>> Examination of the design matrix and I realized that one of the columns
>>> of
>>> the data needed to be changed to a factor. If I had not got the
>>> different result I would have thought that the analysis was correct.
>>> That was the first gotcha. With R you never really know what
>>> you are doing. This was for the simpler model with paramerter for
>>> the variance of the RE's.
>>
>> I did see that, and I agree there is a price to pay for convenience.
>
>
> It is not convenient to effortless get to the wrong answer,
> just a bit of a waste of time.
>>>
>>> Then I used Seth's R script to run the more complicated model.
>>> He was right that the likelihood did not change. Strange!
>>>
>>> So I examined the design matrix for the RE's.
>>> The problem was obvious. rather than a different
>>> parameter for each time period the design matrix had
>>> an overall mean and differences from it. While this
>>> would be the same for fixed effects it is not equivalent
>>> for random effects because it assumes a different covariance
>>> structure.
>>>
>>> I hacked together the correct model by hand and ran it on his data.
>>
>> I agree that the model Seth was specifying was that there is variation
>> among trees in their time-1 response; variation in the difference
>> between time 1 and time 2; and variation in the difference between time
>> 1 and time 3 (unless I'm wrong, which has been known to happen).
>
> All I know is that he said
>
> The data suggest that variance may differ
> sharply before and after treatment (factor variable 'time', values 1/2/3),
>
> I don't see anything about differences just that the variance should depend
> on time.
More information about the Users
mailing list