## How to calculate geometric least square mean in ANCOVA?

Hi All,

Can someone help me with the code or procedure for my description below? I'm trying to do the ANCOVA analysis and to get their GLSM (Geometric Least Square Mean). I have 2 continuous covariants, A and B, 1 categorical covariant C, and 2 treatments Z1 and Z2, and the values of 1 parameter and its log10() value.

My question is:

1. Why we should do the ANCOVA analysis, since there are only 2 treatments?

2. May I ask the code about that? I saw the SASHEP, and it only gives proc glm procedure. But I saw most people use proc mixed.

3. How to get the GLSM, I saw some senior said "Exp(mean(log(x))) = geomean(x)", but I am still confused how to write the code, and whether I should use the original value or log10() value.

I would really appreciate if you could help.

Best regards,

Anran

## Re: How to calculate geometric least square mean in ANCOVA?

@Anranyu wrote:

I have 2 continuous covariants, A and B, 1 categorical covariant C, and 2 treatments Z1 and Z2, and the values of 1 parameter and its log10() value.

My question is:

1. Why we should do the ANCOVA analysis, since there are only 2 treatments?

2. May I ask the code about that? I saw the SASHEP, and it only gives proc glm procedure. But I saw most people use proc mixed.

3. How to get the GLSM, I saw some senior said "Exp(mean(log(x))) = geomean(x)", but I am still confused how to write the code, and whether I should use the original value or log10() value.

1. There are only 2 treatments indeed, but since you need to take the influence of covariates into account, you have to fit a model to the data. (It's beyond the scope of a simple hypothesis test)

2. What is SASHEP?
Here's about  "PROC MIXED Contrasted with Other SAS Procedures".
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_mixed_overview03.htm

PROC MIXED is used (instead of GLM) for hierarchical data / multi-level data / data with group structure / non-independent data or any data that requires random effects.

Random effects can be broken down into three kinds.

• Random intercepts are individual differences in the mean across all conditions (i.e., in the model intercept).
• Random slopes are individual differences in the effect of a predictor: The size and direction of an experimental effect could differ across individuals.
• Finally, correlations between random effects are model parameters describing dependencies between random intercepts and slopes.

3. Your log10-transformed values are the dependent variable, right?
I could only find some interesting info on the ratio of GLSMs.

( National Center for Biotechnology Information (ncbi) . National Library of Medecine (nlm) . National Institutes of Health (nih) )

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2235875/

Scroll down to  GLSMRs calculations.

GLSMRs = the geometric least squares means ratio

Koen

Discussion stats