[R-sig-ME] Observation-level random effects

Shahinur, Islam @h@h|nur@|@|@m @end|ng |rom mun@c@
Thu Apr 8 18:50:14 CEST 2021


Hello All,

Thank you, Dr. Thierry, for the reply!

I am still having the problem!- just in case, I have attached my data
template.

When I am running the following code:
model1 <- lmer(development~ 1 +cross + egg +cross*egg + (1|Tank)+
(1|family) ,data=sp)

Still getting the errors: Error: number of levels of each grouping factor
must be < number of observations (problems: family).

Your suggestions will be much appreciated.

Regards,

Shahin

<><><><><><><><><><><><><><><><><><><><><><><><><><>

Shahinur S. Islam
PhD Candidate, Department of Ocean Sciences
Ocean Sciences Centre, Memorial University of Newfoundland
St. John's, NL  A1C 5S7, Canada
Cell: (+1)709-740-3324; Twitter: @EcoEvoGen


On Thu, Apr 8, 2021 at 1:35 PM Thierry Onkelinx <thierry.onkelinx using inbo.be>
wrote:

> Dear Shanin,
>
> You can't use an observation level random effect with a Gaussian
> distribution.
> Please provide the number of observations, number of unique families and
> number of unique tanks.
>
> Best regards,
>
> Thierry
>
> ir. Thierry Onkelinx
> Statisticus / Statistician
>
> Vlaamse Overheid / Government of Flanders
> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
> FOREST
> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> thierry.onkelinx using inbo.be
> Havenlaan 88 bus 73, 1000 Brussel
> www.inbo.be
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> ///////////////////////////////////////////////////////////////////////////////////////////
>
> <https://www.inbo.be>
>
>
> Op do 8 apr. 2021 om 17:08 schreef Shahinur, Islam <shahinur.islam using mun.ca
> >:
>
>> Hello All,
>> I am having trouble with observation-level random effects while running
>> the
>> full model investigating two fixed covariates (one categorical and one
>> continuous) and two random covariates (tank and family). While I am using
>> the only tank random effect, it works fine, but while I am adding another
>> random covariate (family), I am getting the error message: Error: number
>> of
>> levels of each grouping factor must be < number of observations (problems:
>> family).
>>
>> FYI, here is my code:
>> model1 <- lmer(development~ 1 +cross + egg +cross*egg + (1|Tank)+
>> (1|family) ,data=sp)
>>
>> I do have different family IDs (n=108) for each row, I assume it creates
>> the problem.
>>
>> Your suggestions will be much appreciated!
>>
>> Regards,
>>
>> Shahin
>>
>> <><><><><><><><><><><><><><><><><><><><><><><><><><>
>>
>> Shahinur S. Islam
>> PhD Candidate, Department of Ocean Sciences
>> Ocean Sciences Centre, Memorial University of Newfoundland
>> St. John's, NL  A1C 5S7, Canada
>> Cell: (+1)709-740-3324; Twitter: @EcoEvoGen
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: development.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20210408/c98794d7/attachment.txt>


More information about the R-sig-mixed-models mailing list