Skip to main content
added 30 characters in body; edited title; edited tags
Source Link
amoeba
  • 107.3k
  • 36
  • 321
  • 346

Nested Random Effects - unclear error (lme4) Specifying mixed model for temperature measurements of termite mounds during the day in different soils

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities, differing in soil composition.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)    

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : 
number of levels of each grouping factor must be < number of observations  

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?

Nested Random Effects - unclear error (lme4)

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)    

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : 
number of levels of each grouping factor must be < number of observations  

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?

Specifying mixed model for temperature measurements of termite mounds during the day in different soils

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities, differing in soil composition.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)    

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : 
number of levels of each grouping factor must be < number of observations  

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?

deleted 98 characters in body; edited tags
Source Link
amoeba
  • 107.3k
  • 36
  • 321
  • 346

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)    

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : number of levels of each grouping factor must be < number of observations

Error in checkNlevels(reTrms$flist, n = n, control) : 
number of levels of each grouping factor must be < number of observations  

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?
Many thanks in advance for your time and patience. Any tip of advice will be much appreciated.
ANTÓN

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : number of levels of each grouping factor must be < number of observations

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?
Many thanks in advance for your time and patience. Any tip of advice will be much appreciated.
ANTÓN

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)    

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : 
number of levels of each grouping factor must be < number of observations  

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?

Source Link

Nested Random Effects - unclear error (lme4)

I've got a problem while trying to specify the 'right' nesting of the random effects of my dataset. The dataset registers hourly variations in temperature inside termite mounds:

  1. Sampling was performed in four localities.
  2. On each locality, ~20 termite mounds were sampled.
  3. The temperature of each termite mound was registered every hour during a day.

So, 24 data, per mound, in four localities. According to this previous question, to study how temperatures changes within mounds and among localities, I drew my model as:

Tmodel <- lmer(Temperature ~ Hour + Locality + (1|Locality/Mound/Hour), Tver, REML=FALSE)

and I got this message:

Error in checkNlevels(reTrms$flist, n = n, control) : number of levels of each grouping factor must be < number of observations

From this message, I get that I'm sort of 'constraining' my data, so that per grouping factor (hour, in mound, in locality), there is just one observation; am I right? But then, how should I specify the nestedness of my random factors?
Many thanks in advance for your time and patience. Any tip of advice will be much appreciated.
ANTÓN