<p>Very interesting, if I understand correctly you are asking whether a straight hierarchical clustering should account for a continuous variable because it is resulting in discrete groups (clusters) which seems contradictory for a continuous variable?</p>
<p>If that is the question the answer is strictly no. Do not use weighting for <em>this particular</em> analysis (other regression style analysis yes - but not this one). Thus 'weights' are for regression analysis not for multivariate statistics. This clustering analysis is about assessing the correlation and not trying to impose it - thats regression.</p>
<p>The 'weighting' that can be used is different for a tree based analysis - it accounts for rate variation within the expression data - you are assuming rate homogeneity. That doesn't always work - but it's complicated and your data looks good as is.</p>
<p>Moreover, I would suggest your have 4 clusters. What you want to do is map the continuous trait across all branches 'tips' of your clustering. This will break up your continuous variable (hopefully) and looking at the MDS very much into discrete groups. That is the result, in fact it may not be 2 clusters but 4 clusters - map all the 'tips' against the continuous variable. There're statistically randomisation tree methods to assess the robustness of the observation - you can also use bootstrapping.</p>
<p>The question is whether these discrete groups are in fact the best description of the data. The MDS suggests that the continuous variable &quot;air pollution&quot; is in continuous within gene expression - using a combination of clustering and MDS you highlight this facet of the data. There alternative analyses namely regression or GLM to assess the relationship between the continuous variable and your results - the MDS is suggestive of that. However, it's not a 'and', 'or', 'right', 'wrong' relationship a continuous variable can be broken up into discrete groups: if there is a 1:1 relationship between the gene expression and the continuous variable &quot;air pollution&quot; (MDS analysis) - that is a better description, if that relationship doesn't hold breaking into discrete clusters is the best description <em>thus far</em>.</p>
<p>Essentially this is statistical modelling and the question is what is the best model to fit all the data. I'm personally not a fan of hierarchical clustering as a tree description of the data - but in your data it looks good.</p>
<p>At the heart of the question you are asking whether there are boundary effects in the data as described by the hierarchical clustering? Thus is there a certain level of pollution (or whatever) causing one gene expression boundary and then another and so on ... Perfectly possible - but central to that hypothesis is whether clustering is the best description of the data rather than a regression analysis, i.e. is it continuous or is it discrete.</p>
<p><strong>Discrete vs. continuous</strong>  If it is discrete then k-means clustering would be a really, really good follow-up analysis to confirm the discrete &quot;boundary&quot; effects within the data. GLM is an analysis that might trap the data if it's continuous, there a lot of other methods in regression analysis. Basically if you map each &quot;pollution&quot; exposure against the MDS and if it's a perfect fit - trapping the result in a regression model outside eigenvalues would be the traditional thing to do. However, these days &quot;unsupervised learning&quot; (of which MDS is one method) is trendy so it may not be needed.</p>
<p><strong>k-means clustering</strong> I would certainly consider k-means clustering in any case - this is because hierarchical clustering makes a rate assumption which might smash up the discrete groups. K-means can capture that without getting into complicated tree analysis. Basically, k-means you'll set 2 groups - assess the fit of the continuous variable, try 3 and then 4, how does the air-pollution variable fit? The data will also work well with supervised machine learning. However, it is genuinely continuous then regression analysis is best approach. With k-means you can also do parameterisation, i.e. whats the optimal number of groups represented by the data: if it comes back with '4' - which neatly segregate &quot;air pollution&quot; thats really good.</p>
<p>It's an exciting result. The way you write the result in the context of the conclusion is really important - i.e. the continuous verse discrete best fit analysis - in case you encounter a statistical modeller in peer-review.</p>
<p>My answer is a bit waffly, but is a representation of statistical modelling in this particular data, because two approaches may both be appropriate, but one is a better description than the other.</p>
<hr />
<p><strong>Note</strong>, if I've misunderstood the question and some sort of standardisation is needed between experiments - thats a different answer. Thus if you are saying that the groups represent different experiments, e.g. performed on different days or different arrays and there's risk of experimental artefact: thats about standardisation and the answer would be absolutely. Standardisation is essential to rule out experimental bias - particularly in microarray data.</p>

CC BY-SA 4.0
2023-02-17T11:57:25.380Z
Thank you for your very detailed answer. Highly appreciate it. I will slowly go through it and digest it. :)
siddhartha das
CC BY-SA 4.0
2023-02-17T13:14:09.530Z
Thanks let me know @siddharthadas
M__
CC BY-SA 4.0
2023-02-16T10:08:19.757Z
2023-02-16T16:09:22.400Z
2023-02-16T16:09:22.400Z
M__
<p>I seem to have two groups of samples based on hierarchical clustering as well as MDS plot analysis using the sample label from the tree cut of the hierarchial clustering. I am analyzing microarray data. Should I adjust for the two different groups of samples in the model? For context, my covariate of interest is a continuous measure (air pollutant measure). This is a human cohort and not a case-control model and hence I was wondering if I should adjust for the different groups of samples.
[<img src="https://i.sstatic.net/20fhm.jpg" alt="Hierarchial clustering][1]" /></p>
<p>MDS plot is <a href="https://i.sstatic.net/O2Jch.jpg" rel="nofollow noreferrer">here</a> for the same samples:
<a href="https://i.sstatic.net/VuE7b.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VuE7b.png" alt="enter image description here" /></a></p>

<phylogenetics><phylogeny><microarray>
Should I compensate for two clusters of samples in microarray by hierarchical clustering and MDS?
# Should I compensate for two clusters of samples in microarray by hierarchical clustering and MDS?

(Asked by: username_0 on 2023-02-16)

I seem to have two groups of samples based on hierarchical clustering as well as MDS plot analysis using the sample label from the tree cut of the hierarchial clustering. I am analyzing microarray data. Should I adjust for the two different groups of samples in the model? For context, my covariate of interest is a continuous measure (air pollutant measure). This is a human cohort and not a case-control model and hence I was wondering if I should adjust for the different groups of samples.
[![Hierarchial clustering][1]](https://i.sstatic.net/20fhm.jpg)

MDS plot is [here](https://i.sstatic.net/O2Jch.jpg) for the same samples:
[![enter image description here](https://i.sstatic.net/VuE7b.png)](https://i.sstatic.net/VuE7b.png)

**Tags:** phylogenetics, phylogeny, microarray

---

## 1 answers

### Answer by username_1 on 2023-02-16. Score: 1

Very interesting, if I understand correctly you are asking whether a straight hierarchical clustering should account for a continuous variable because it is resulting in discrete groups (clusters) which seems contradictory for a continuous variable?

If that is the question the answer is strictly no. Do not use weighting for *this particular* analysis (other regression style analysis yes - but not this one). Thus 'weights' are for regression analysis not for multivariate statistics. This clustering analysis is about assessing the correlation and not trying to impose it - thats regression.

The 'weighting' that can be used is different for a tree based analysis - it accounts for rate variation within the expression data - you are assuming rate homogeneity. That doesn't always work - but it's complicated and your data looks good as is.

Moreover, I would suggest your have 4 clusters. What you want to do is map the continuous trait across all branches 'tips' of your clustering. This will break up your continuous variable (hopefully) and looking at the MDS very much into discrete groups. That is the result, in fact it may not be 2 clusters but 4 clusters - map all the 'tips' against the continuous variable. There're statistically randomisation tree methods to assess the robustness of the observation - you can also use bootstrapping.

The question is whether these discrete groups are in fact the best description of the data. The MDS suggests that the continuous variable "air pollution" is in continuous within gene expression - using a combination of clustering and MDS you highlight this facet of the data. There alternative analyses namely regression or GLM to assess the relationship between the continuous variable and your results - the MDS is suggestive of that. However, it's not a 'and', 'or', 'right', 'wrong' relationship a continuous variable can be broken up into discrete groups: if there is a 1:1 relationship between the gene expression and the continuous variable "air pollution" (MDS analysis) - that is a better description, if that relationship doesn't hold breaking into discrete clusters is the best description *thus far*.

Essentially this is statistical modelling and the question is what is the best model to fit all the data. I'm personally not a fan of hierarchical clustering as a tree description of the data - but in your data it looks good.

At the heart of the question you are asking whether there are boundary effects in the data as described by the hierarchical clustering? Thus is there a certain level of pollution (or whatever) causing one gene expression boundary and then another and so on ... Perfectly possible - but central to that hypothesis is whether clustering is the best description of the data rather than a regression analysis, i.e. is it continuous or is it discrete.

**Discrete vs. continuous** If it is discrete then k-means clustering would be a really, really good follow-up analysis to confirm the discrete "boundary" effects within the data. GLM is an analysis that might trap the data if it's continuous, there a lot of other methods in regression analysis. Basically if you map each "pollution" exposure against the MDS and if it's a perfect fit - trapping the result in a regression model outside eigenvalues would be the traditional thing to do. However, these days "unsupervised learning" (of which MDS is one method) is trendy so it may not be needed.

**k-means clustering** I would certainly consider k-means clustering in any case - this is because hierarchical clustering makes a rate assumption which might smash up the discrete groups. K-means can capture that without getting into complicated tree analysis. Basically, k-means you'll set 2 groups - assess the fit of the continuous variable, try 3 and then 4, how does the air-pollution variable fit? The data will also work well with supervised machine learning. However, it is genuinely continuous then regression analysis is best approach. With k-means you can also do parameterisation, i.e. whats the optimal number of groups represented by the data: if it comes back with '4' - which neatly segregate "air pollution" thats really good.

It's an exciting result. The way you write the result in the context of the conclusion is really important - i.e. the continuous verse discrete best fit analysis - in case you encounter a statistical modeller in peer-review.

My answer is a bit waffly, but is a representation of statistical modelling in this particular data, because two approaches may both be appropriate, but one is a better description than the other.

---

**Note**, if I've misunderstood the question and some sort of standardisation is needed between experiments - thats a different answer. Thus if you are saying that the groups represent different experiments, e.g. performed on different days or different arrays and there's risk of experimental artefact: thats about standardisation and the answer would be absolutely. Standardisation is essential to rule out experimental bias - particularly in microarray data.

> **Comments:**
> **username_0**: Thank you for your very detailed answer. Highly appreciate it. I will slowly go through it and digest it. :)  
> **username_1**: Thanks let me know @siddharthadas  

---

