Re: [AMBER] How is correlation computed in cpptraj

From: Matthew Guberman-Pfeffer <>
Date: Mon, 25 Oct 2021 11:07:22 -0400

I figured out part of my question, so I wanted to update my original post.

The part I now understand: CPPTRAJ does indeed compute the Pearson correlation coefficient, which differs from what Excel reports (via the LINEST function) as R^2, because Excel computes instead the coefficient of determination, which is the square of the Pearson correlation coefficient if there is a single predictor variable ( <>).

The part I still don’t understand: What is the meaning of the per-frame output from corr, and how can a given frame have a value > 1.0?


> On Oct 25, 2021, at 4:45 AM, Matthew Guberman-Pfeffer <> wrote:
> Dear Amber Community,
> I am using the corr command in cpptraj to compute the correlation between two data sets, but I am confused over how the correlation at a given frame in the output could be > 1.0. How is the measure of correlation at a given frame being calculated?
> Also, when I compare the correlation coefficient to what I obtain in, for example Excel with the LINEST function, I get a very different value. How is the correlation coefficient being calculated?
> Best,
> Matthew

AMBER mailing list
Received on Mon Oct 25 2021 - 08:30:02 PDT
Custom Search