Thank you for your response Alan, however this results in a different error:

fit.10=lme(met~group+Event_name+group*Event_name,
    data=set1,
    random=~1|ID/Event_name,
    corr=corSymm(form=~1|ID),
    weights=varIdent(form=~1|Event_name))

Warning message:
In lme.formula(met ~ group + Event_name + Pig_group *  :
  Cannot use smaller level of grouping for "correlation" than for "random".
Replacing the former with the latter.
Done.

The random effect argument is indeed the one I want to analyze (as done in
the simplest form put below).  Is there a different syntax that is required
for corSymm?

Simple form:

fit.7=lme(met~group+Event_
name+
   Survival+group*Event_name,
   data=set1,
   random=~1|ID/Event_name)


Best,

Charles

On Thu, Apr 12, 2012 at 6:38 AM, Alan Haynes <aghaynes@gmail.com> wrote:

> Hi Charles,
>
> The problem is probably simply that you haven't included a random effect
> argument to lme. lme must have a random effect argument in one of a number
> of forms (see the lme help file).
>
> Based on your gls model i assume the random effect you want is as below.
>
> fit.10=lme(met~group+Event_name+

   group*Event_name,
>    data=set1,
>    random= ~1|ID/Event_name,
>    corr=corSymm(form=~1|ID),
>    weights=varIdent(form=~1|Event_name))
>
>
> Hope that helps
>
> Alan
>
>
> --------------------------------------------------
> Email: aghaynes@gmail.com
> Mobile: +41794385586
> Skype: aghaynes
>
>
> On 11 April 2012 18:12, Charles Determan Jr <deter088@umn.edu> wrote:
>
>> Greetings R users,
>>
>> I have been trying to generate a mixed model of some data and I have run
>> into a stumble.  I am trying to do what sas refers to as 'unstructured'
>> variance structure.  The comparable correlation structure in the nlme
>> package is corSymm().  I am able to run it generally just fine but when I
>> try unstructured I run into this problem.  I am able to run a gls() script
>> but when I try and run the same thing with lme(), I get the error shown
>> below.
>>
>> In the simplest form, the model that works perfectly is:
>>
>> fit.7=lme(met~group+Event_name+
>>    Survival+group*Event_name,
>>    data=set1,
>>    random=~1|ID/Event_name)
>>
>> The random is structured because the set is nested data.  I have been
>> trying to run an unstructured version.
>>
>>
>>
>> The gls() version using corSymm works but I didn't think this was still a
>> mixed model but a general least squares model instead.
>>
>> fit.10=gls(met~group+Event_name+
>>    survival+group*Event_name,
>>    data=set1,
>>    corr=corSymm(form=~1|ID),
>>    weights=varIdent(form=~1|Event_name))
>>
>>
>> The model I wish to fit is with lme()
>>
>> fit.10=lme(met~group+Event_name+
>>    survival+group*Event_name,
>>    data=set1,
>>    corr=corSymm(form=~1|ID),
>>    weights=varIdent(form=~1|Event_name))
>>
>> Error in lme.formula(met ~ group + Event_name + survival + group *  :
>>  Incompatible formulas for groups in "random" and "correlation"
>> Done.
>>
>> Is there some syntax I have mistaken or coded incorrectly?  Why is it that
>> the lme() script doesn't work?  Any general advice is appreciated.
>>
>> Charles
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>
>

	[[alternative HTML version deleted]]

