libsim
Versione7.2.1
|
Compute the linear correlation coefficient between the two random variables provided, taking into account missing data. Continua...
Compute the linear correlation coefficient between the two random variables provided, taking into account missing data.
Data are considered missing when at least one variable has a missing value. The average and the variance of each variable can be returned as optional parameters since they are computed anyway. The result is of type REAL or DOUBLE PRECISION according to the type of sample1 and sample2.
REAL or DOUBLE PRECISION FUNCTION stat_linear_corr()
sample1(:) | REAL,INTENT(in) or DOUBLE PRECISION,INTENT(in) the first variable |
sample2(:) | REAL,INTENT(in) or DOUBLE PRECISION,INTENT(in) the second variable |
average1 | REAL,OPTIONAL,INTENT(out) or DOUBLE PRECISION,OPTIONAL,INTENT(out) the average of the first variable can optionally be returned |
average2 | REAL,OPTIONAL,INTENT(out) or DOUBLE PRECISION,OPTIONAL,INTENT(out) the average of the second variable can optionally be returned |
variance1 | REAL,OPTIONAL,INTENT(out) or DOUBLE PRECISION,OPTIONAL,INTENT(out) the variance of the first variable can optionally be returned |
variance2 | REAL,OPTIONAL,INTENT(out) or DOUBLE PRECISION,OPTIONAL,INTENT(out) the variance of the second variable can optionally be returned |
mask(:) | LOGICAL,OPTIONAL,INTENT(in) additional mask to be and'ed with missing values |
Definizione alla linea 89 del file simple_stat.f90.