Skip to main content
Updated following an update to the question
Source Link
Robert Long
  • 65.8k
  • 11
  • 133
  • 248

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. ThisYou have plenty of groups to do this. It would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. This will tell you the association between the two variables (similar to a correlation coefficient), adjusting for clustering effect. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. This would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. This will tell you the association between the two variables (similar to a correlation coefficient), adjusting for clustering effect. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. You have plenty of groups to do this. It would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. This will tell you the association between the two variables (similar to a correlation coefficient), adjusting for clustering effect. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.
more into
Source Link
Robert Long
  • 65.8k
  • 11
  • 133
  • 248

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. This would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. This will tell you the association between the two variables (similar to a correlation coefficient), adjusting for clustering effect. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. This would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. This would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. This will tell you the association between the two variables (similar to a correlation coefficient), adjusting for clustering effect. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.
Source Link
Robert Long
  • 65.8k
  • 11
  • 133
  • 248

More information would be useful, but in general when data are clustered, you must account for the possible non-independence of observations within clusters. This means that you cannot use simple correlation (if there is a clustering effect)

One way to analyse your data is to run a mixed effects model, with group as a random effect. This would be a regression model, rather than a simple correlation, but it will account for non-independence between clusters. However, some caveats are:

  • you will need to choose an "outcome" variable. This many be obvious in your situation but there is insufficient information to determine this from the OP.
  • if you have very few clusters, the results may be biased
  • You will need to choose an appropriate model given the distribution of your outcome variable. You say it is not normally distributed, which is OK. Mixed effects models can handle a wide range of distributions.