Statistics Module

History

current version 1.1 - 19th May 2021

version date comment
1.0 21/Jun/2017 Original code
1.1 19/May/2021 linearRegressionSlope compute R2 as optional argument

License

license: GNU GPL http://www.gnu.org/licenses/

This file is part of

MOSAICO -- MOdular library for raSter bAsed hydrologIcal appliCatiOn.

Copyright (C) 2011 Giovanni Ravazzani

Module Description

library to compute statistics



Interfaces

public interface GetMeanVector

  • private function GetMeanFloat(vector, nodata) result(mean)

    compute mean of a vector of real numbers. If nodata is passed numbers are filetered before computing mean

    Arguments

    Type IntentOptional Attributes Name
    real(kind=float), intent(in) :: vector(:)
    real(kind=float), intent(in), optional :: nodata

    Return Value real(kind=float)


Functions

public function LinearRegressionSlope(x, y, nodata, r2) result(lrs)

compute slope of linear regression between vector x and y

Arguments

Type IntentOptional Attributes Name
real(kind=float), intent(in) :: x(:)
real(kind=float), intent(in) :: y(:)
real(kind=float), intent(in), optional :: nodata
real(kind=float), intent(out), optional :: r2

Return Value real(kind=float)

slope of linear regression

private function GetMeanFloat(vector, nodata) result(mean)

compute mean of a vector of real numbers. If nodata is passed numbers are filetered before computing mean

Arguments

Type IntentOptional Attributes Name
real(kind=float), intent(in) :: vector(:)
real(kind=float), intent(in), optional :: nodata

Return Value real(kind=float)