GetRSquared (Method)

Applies To:

TrendLine object

Description:

Returns the calculated goodness of fit (R-squared) value for the selected z layer (1 by default).

Syntax:

Expression.GetRSquared([optional] Number z)

Example:

This example shows how to return the goodness of fit value from trend lines 2, and write it to the Console window:

Console.Write(ActiveDocument.Sections["Chart6"].TrendLines[2].GetRSquared())