AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de valores numéricos / Funciones estadísticas
  • Calculating the coefficient of correlation
  • Number of elements found in the matrix
  • Error management
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Calculates the coefficient of correlation between two series of values.
// Calculate the coefficient of correlation between row 1 and row 2 of a matrix
ResCorrelationCoef = StatCorrelation("MyMatrix", 1, 2, False)
Sintaxis
<Result> = StatCorrelation(<Matrix> [, <1st row/1st column> [, <2nd row/2nd column> [, <Row/Column>]]])
<Result>: Real
  • Coefficient of correlation that exist between the two series of values,
  • 0 if the coefficient of correlation is null.
<Matrix>: Character string
Name of the matrix containing the data, defined by MatCreate.
<1st row/1st column>: Optional integer
1st row or 1st column containing the data (1 by default).
<2nd row/2nd column>: Optional integer
2nd row or 2nd column containing the data (2 by default).
<Row/Column>: Optional boolean
  • True (by default) if the series of values correspond to matrix columns,
  • False if the series of values correspond to matrix rows.
Observaciones

Calculating the coefficient of correlation

StatCorrelation("MyMatrix", 1, 3, False) returns 0,997054.
StatCorrelation("MyMatrix", 1, 3, False) returns 1.
StatCorrelation("MyMatrix", 1, 3, False) returns 0.

Number of elements found in the matrix

The number of elements found in the matrix is taken as reference. This number of elements corresponds to:
  • the number of matrix rows, returned by MatNbLine.
  • the number of matrix columns, returned by MatNbColumn.
If the series contain less elements than the matrix, the missing values are automatically filled with 0. These values are taken into account during the calculations.

Error management

Caution: StatCorrelation returns no error code. To find out whether errors have been generated when calculating the coefficient of correlation, use StatError. To get more details on the error, use ErrorInfo with the errMessage constant.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300mat.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local