![]() |
libSUFR
a LIBrary of Some Useful Fortran Routines
|
Procedures to do statistics. More...
Functions/Subroutines | |
| real(double) function | median (data, mask) |
| Compute the median of a data array. | |
| real function | median_sp (data, mask) |
| Compute the median of a data array - single-precision wrapper for median() | |
| real(double) function | mean (data, mask) |
| Compute the mean of a data array. | |
| real function | mean_sp (data, mask) |
| Compute the mean of a data array - single-precision wrapper for mean() | |
| real(double) function | mean_weight (data, wgts, mask) |
| Compute the weighted mean of a data array. | |
| real(double) function | stdev (data, dmean, mask, var) |
| Compute the standard deviation of a data array with mean 'mean'. | |
| real function | stdev_sp (data, mean, mask) |
| Compute the standard deviation of a data array with mean 'mean' - single-precision wrapper for stDev() | |
| real(double) function | stdev_weight (data, wgts, wmean, mask) |
| Compute the weighted standard deviation of a data array with weighted mean 'wMean'. | |
| pure subroutine | mean_var_running (mean, var, data, num, stdev) |
| Compute a running mean and variance by adding a data point and the data point number to existing values. If num=1, initialise. Note that mean and var are I/O variables and cannot be dummy variables or values. Num must be accurate, and increased by one between calls by the user. Optionally, return the standard deviation. | |
| subroutine | prob_range (data, range, llim, ulim, mask) |
| Find a given probability range for a data array - the narrowest range that contains a given fraction of data points. | |
| subroutine | prob_range_sp (data, range, llim, ulim, mask) |
| Find a given probability range for a data array - the narrowest range that contains a given fraction of data points - single-precision wrapper for prob_range() | |
| pure integer function | determine_nbin_1d (npoints) |
| Roughly estimate the number of 1D bins needed, from the number of data points. | |
| subroutine | bin_data_1d (xdat, nbin, norm, mode, cumul, xmin, xmax, xbin, ybin) |
| Bin data in 1D bins by counting the number of data points in each bin. | |
| subroutine | bin_data_1d_sp (xdat, nbin, norm, mode, cumul, xmin, xmax, xbin, ybin) |
| Bin data in 1D bins by counting the number of data points in each bin - single-precision wrapper for bin_data_1d() | |
| pure subroutine | histogram_1d_onthefly (xdat, nbin, mode, cumul, xmin, xmax, xbin, ybin, init, weight) |
| Create a 1D histogram on the fly (point by point). Bin data points by computing the bin they should be in. | |
| subroutine | bin_data_2d (xdat, ydat, norm, nxbin, nybin, xmin, xmax, ymin, ymax, z, tr, weights) |
| Bin data in 2 dimensions - computing the bin number rather than searching for it is ~10x faster. | |
| subroutine | bin_data_2d_sp (xdat, ydat, norm, nxbin, nybin, xmin, xmax, ymin, ymax, z, tr, weights) |
| Bin data in 2 dimensions - single-precision wrapper for bin_data_2d() | |
| subroutine | histogram_2d_onthefly (xdat, ydat, nxbin, nybin, xmin, xmax, ymin, ymax, z, init, weight, tr) |
| Bin data in 2 dimensions - computing the bin number rather than searching for it is ~10x faster. | |
| pure integer(long) function | faculty_i (n) |
| Compute the faculty of an integer, returning a long integer. | |
| pure real(double) function | faculty (n) |
| Compute the faculty of an integer, returning a double-precision real. | |
| pure real(double) function | binom_coeff (n, k) |
| Compute the binomial coefficient of n and k. | |
| pure real(double) function | binom_prob (n, k, p) |
| Compute the binomial probability of n and k, and probability p. | |
| pure real(double) function | binom_cumul_prob (n, k, p) |
| Compute the cumulative binomial probability of n and k OR FEWER, and probability p. | |
| pure real(double) function | poisson_prob (k, lambda) |
| Compute the Poisson probability of EXACTLY k events occurring in a fixed interval for a known average rate lambda, and independently of the time since the last event: P = λ^k e^-λ / k! | |
| pure real(double) function | poisson_prob_cumul (k, lambda) |
| Compute the cumulative Poisson probability of k OR FEWER events occurring in a fixed interval for a known average rate lambda, and independently of the time since the last event: P = Σ(i=0,k) λ^i e^-λ / i! | |
| real(double) function | correlation (data1, data2) |
| Compute the normalised correlation between two data series. | |
Procedures to do statistics.
| subroutine sufr_statistics::bin_data_1d | ( | real(double), dimension(:), intent(in) | xdat, |
| integer, intent(in) | nbin, | ||
| logical, intent(in) | norm, | ||
| integer, intent(in) | mode, | ||
| logical, intent(in) | cumul, | ||
| real(double), intent(inout) | xmin, | ||
| real(double), intent(inout) | xmax, | ||
| real(double), dimension(:), intent(inout) | xbin, | ||
| real(double), dimension(:), intent(inout) | ybin ) |
Bin data in 1D bins by counting the number of data points in each bin.
| xDat | Data to be binned (ndat points) |
| Nbin | Desired number of bins. Note that the binned-data arrays xbin and ybin must have size >= Nbin+1 |
| norm | Normalise histogram (T) or not (F) |
| mode | Mode: -1: xbin is left of bin, 0: xbin is centre of bin, 1: xbin is right of bin |
| cumul | Make a cumulative histogram (T/F) |
| xMin | Minimum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xMax | Maximum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xBin | Binned data, location of the bins. The x values are the left side of the bin! (output) |
| yBin | Binned data, height of the bins. I/O so that the array size can be checked (output) |
Definition at line 596 of file statistics.f90.
References sufr_kinds::double, and sufr_system::quit_program_error().
Referenced by bin_data_1d_sp().

| subroutine sufr_statistics::bin_data_1d_sp | ( | real, dimension(:), intent(in) | xdat, |
| integer, intent(in) | nbin, | ||
| logical, intent(in) | norm, | ||
| integer, intent(in) | mode, | ||
| logical, intent(in) | cumul, | ||
| real, intent(inout) | xmin, | ||
| real, intent(inout) | xmax, | ||
| real, dimension(:), intent(inout) | xbin, | ||
| real, dimension(:), intent(inout) | ybin ) |
Bin data in 1D bins by counting the number of data points in each bin - single-precision wrapper for bin_data_1d()
| xDat | Data to be binned (ndat points) |
| Nbin | Desired number of bins. Note that the binned-data arrays xBin and yBin must have size >= Nbin+1 |
| norm | Normalise histogram (T) or not (F) |
| mode | Mode: -1: xBin is left of bin, 0: xBin is centre of bin, 1: xBin is right of bin |
| cumul | Make a cumulative histogram (T/F) |
| xMin | Minimum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xMax | Maximum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xBin | Binned data, location of the bins. The x values are the left side of the bin! (output) |
| yBin | Binned data, height of the bins. I/O so that the array size can be checked (output) |
Definition at line 670 of file statistics.f90.
References bin_data_1d(), sufr_kinds::double, and sufr_system::quit_program_error().

| subroutine sufr_statistics::bin_data_2d | ( | real(double), dimension(:), intent(in) | xdat, |
| real(double), dimension(:), intent(in) | ydat, | ||
| integer, intent(in) | norm, | ||
| integer, intent(in) | nxbin, | ||
| integer, intent(in) | nybin, | ||
| real(double), intent(inout) | xmin, | ||
| real(double), intent(inout) | xmax, | ||
| real(double), intent(inout) | ymin, | ||
| real(double), intent(inout) | ymax, | ||
| real(double), dimension(nxbin+1,nybin+1), intent(out) | z, | ||
| real(double), dimension(6), intent(out) | tr, | ||
| real(double), dimension(size(xdat)), intent(in), optional | weights ) |
Bin data in 2 dimensions - computing the bin number rather than searching for it is ~10x faster.
| xDat | Input data: x values - array size: ndat |
| yDat | Input data: y values - array size: ndat |
| norm | Normalise the bins (1) or not (0) |
| nxBin | Desired number of bins in the x direction |
| nyBin | Desired number of bins in the y direction |
| xMin | Lower limit for the binning range in the x direction - autodetermine if xMin = xMax |
| xMax | Upper limit for the binning range in the x direction - autodetermine if xMin = xMax |
| yMin | Lower limit for the binning range in the y direction - autodetermine if yMin = yMax |
| yMax | Upper limit for the binning range in the y direction - autodetermine if yMin = yMax |
| z | Binned data set z(nxBin+1,nyBin+1) - this array may be larger than you expect - nbin bins have nbin+1 borders (output) |
| tr | Transformation elements for pgplot tr(6) (output) |
| weights | Weights to use when binning data, same size as xDat,yDat (optional) |
Definition at line 804 of file statistics.f90.
References sufr_kinds::double, and sufr_system::quit_program_error().
Referenced by bin_data_2d_sp().

| subroutine sufr_statistics::bin_data_2d_sp | ( | real, dimension(:), intent(in) | xdat, |
| real, dimension(:), intent(in) | ydat, | ||
| integer, intent(in) | norm, | ||
| integer, intent(in) | nxbin, | ||
| integer, intent(in) | nybin, | ||
| real, intent(inout) | xmin, | ||
| real, intent(inout) | xmax, | ||
| real, intent(inout) | ymin, | ||
| real, intent(inout) | ymax, | ||
| real, dimension(nxbin+1,nybin+1), intent(out) | z, | ||
| real, dimension(6), intent(out) | tr, | ||
| real, dimension(size(xdat)), intent(in), optional | weights ) |
Bin data in 2 dimensions - single-precision wrapper for bin_data_2d()
| xDat | Input data: x values - array size: ndat |
| yDat | Input data: y values - array size: ndat |
| norm | Normalise the bins (1) or not (0) |
| nxBin | Desired number of bins in the x direction |
| nyBin | Desired number of bins in the y direction |
| xMin | Lower limit for the binning range in the x direction - autodetermine if xMin = xMax |
| xMax | Upper limit for the binning range in the x direction - autodetermine if xMin = xMax |
| yMin | Lower limit for the binning range in the y direction - autodetermine if yMin = yMax |
| yMax | Upper limit for the binning range in the y direction - autodetermine if yMin = yMax |
| z | Binned data set z(nxBin+1,nyBin+1) - this array may be larger than you expect - nbin bins have nbin+1 borders (output) |
| tr | Transformation elements for pgplot tr(6) (output) |
| weights | Weights to use when binning data, same size as xDat,yDat (optional) |
Definition at line 906 of file statistics.f90.
References bin_data_2d(), sufr_kinds::double, and sufr_system::quit_program_error().

| pure real(double) function sufr_statistics::binom_coeff | ( | integer, intent(in) | n, |
| integer, intent(in) | k ) |
Compute the binomial coefficient of n and k.
| n | Total number of trials; n in "n choose k" |
| k | Number of succesful trials; k in "n choose k" |
| binom_coeff | Binomial coefficient n! / [k!(n-k)!] |
Definition at line 1080 of file statistics.f90.
References binom_coeff(), and sufr_kinds::double.
Referenced by binom_coeff(), and binom_prob().

| pure real(double) function sufr_statistics::binom_cumul_prob | ( | integer, intent(in) | n, |
| integer, intent(in) | k, | ||
| real(double), intent(in) | p ) |
Compute the cumulative binomial probability of n and k OR FEWER, and probability p.
| n | Total number of trials; n in "n choose k" |
| k | Number of succesful trials OR FEWER; k in "n choose k" |
| p | Probability of a succesful trial |
| binom_cumul_prob | Cumulative binomial probability Σ(i=0,k) n! / [i!(n-i)!] * p^i * (1-p)^(n-i) |
Definition at line 1140 of file statistics.f90.
References binom_cumul_prob(), binom_prob(), and sufr_kinds::double.
Referenced by binom_cumul_prob().

| pure real(double) function sufr_statistics::binom_prob | ( | integer, intent(in) | n, |
| integer, intent(in) | k, | ||
| real(double), intent(in) | p ) |
Compute the binomial probability of n and k, and probability p.
| n | Total number of trials; n in "n choose k" |
| k | Number of succesful trials; k in "n choose k" |
| p | Probability of a succesful trial |
| binom_prob | Binomial probability n! / [k!(n-k)!] * p^k * (1-p)^(n-k) |
Definition at line 1117 of file statistics.f90.
References binom_coeff(), binom_prob(), and sufr_kinds::double.
Referenced by binom_cumul_prob(), and binom_prob().

| real(double) function sufr_statistics::correlation | ( | real(double), dimension(:), intent(in) | data1, |
| real(double), dimension(:), intent(in) | data2 ) |
Compute the normalised correlation between two data series.
| data1 | Data series 1 |
| data2 | Data series 2 - should have the same length as data1 |
| correlation | Normalised correlation [-1,1] between the two data series |
Definition at line 1217 of file statistics.f90.
References correlation(), sufr_kinds::double, mean(), and sufr_system::warn().
Referenced by correlation().

| pure integer function sufr_statistics::determine_nbin_1d | ( | integer, intent(in) | npoints | ) |
Roughly estimate the number of 1D bins needed, from the number of data points.
| npoints | Number of data points |
| determine_nbin_1d | Number of bins |
Definition at line 564 of file statistics.f90.
References determine_nbin_1d().
Referenced by determine_nbin_1d().

| pure real(double) function sufr_statistics::faculty | ( | integer, intent(in) | n | ) |
Compute the faculty of an integer, returning a double-precision real.
| n | Number - can be up to 170 for double-precision reals (as opposed to 20 for long integers and 13 for integers) |
| faculty | Faculty of n; n! (double-precision real) |
Definition at line 1055 of file statistics.f90.
References sufr_kinds::double, and faculty().
Referenced by faculty(), and poisson_prob().

| pure integer(long) function sufr_statistics::faculty_i | ( | integer, intent(in) | n | ) |
Compute the faculty of an integer, returning a long integer.
| n | Number - up to 20 for long integers (up to 13 for integers) |
| faculty_i | Faculty of n; n! - a long integer |
Definition at line 1033 of file statistics.f90.
References faculty_i(), and sufr_kinds::long.
Referenced by faculty_i().

| pure subroutine sufr_statistics::histogram_1d_onthefly | ( | real(double), intent(in) | xdat, |
| integer, intent(in) | nbin, | ||
| integer, intent(in) | mode, | ||
| logical, intent(in) | cumul, | ||
| real(double), intent(in) | xmin, | ||
| real(double), intent(in) | xmax, | ||
| real(double), dimension(:), intent(inout) | xbin, | ||
| real(double), dimension(:), intent(inout) | ybin, | ||
| logical, intent(in), optional | init, | ||
| real(double), intent(in), optional | weight ) |
Create a 1D histogram on the fly (point by point). Bin data points by computing the bin they should be in.
| xDat | Data point to be binned |
| Nbin | Desired number of bins. Note that the binned-data arrays xBin and yBin must have size >= Nbin+1 |
| mode | Mode: -1: xBin is left of bin, 0: xBin is centre of bin, 1: xBin is right of bin |
| cumul | Make a cumulative histogram (T/F) |
| xMin | Minimum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xMax | Maximum value of the binning range. Set xMin=xMax to auto-determine (I/O) |
| xBin | Binned data, location of the bins. The x values are the left side of the bin! (output) |
| yBin | Binned data, height of the bins. I/O so that the array size can be checked (output) |
| init | Initialisation call: true/false (data collection). Optional; default=false. |
| weight | Add weight to the bin, rather than 1. Optional; default=1. |
Definition at line 719 of file statistics.f90.
References sufr_kinds::double, and sufr_system::quit_program_error().

| subroutine sufr_statistics::histogram_2d_onthefly | ( | real(double), intent(in) | xdat, |
| real(double), intent(in) | ydat, | ||
| integer, intent(in) | nxbin, | ||
| integer, intent(in) | nybin, | ||
| real(double), intent(in) | xmin, | ||
| real(double), intent(in) | xmax, | ||
| real(double), intent(in) | ymin, | ||
| real(double), intent(in) | ymax, | ||
| real(double), dimension(nxbin+1,nybin+1), intent(out) | z, | ||
| logical, intent(in), optional | init, | ||
| real(double), intent(in), optional | weight, | ||
| real(double), dimension(6), intent(out), optional | tr ) |
Bin data in 2 dimensions - computing the bin number rather than searching for it is ~10x faster.
| xDat | Input data point: x value |
| yDat | Input data point: y value |
| nxBin | Desired number of bins in the x direction |
| nyBin | Desired number of bins in the y direction |
| xMin | Lower limit for the binning range in the x direction - autodetermine if xMin = xMax |
| xMax | Upper limit for the binning range in the x direction - autodetermine if xMin = xMax |
| yMin | Lower limit for the binning range in the y direction - autodetermine if yMin = yMax |
| yMax | Upper limit for the binning range in the y direction - autodetermine if yMin = yMax |
| z | Binned data set z(nxBin+1,nyBin+1) - this array may be larger than you expect - nbin bins have nbin+1 borders (output) |
| init | Init mode: true/false (optional) |
| weight | Weight to use when binning data, same size as xDat,yDat (optional) |
| tr | Transformation elements for pgplot tr(6) (output; optional) |
Definition at line 967 of file statistics.f90.
References sufr_kinds::double, and sufr_system::quit_program_error().

| real(double) function sufr_statistics::mean | ( | real(double), dimension(:), intent(in) | data, |
| logical, dimension(:), intent(in), optional | mask ) |
Compute the mean of a data array.
| data | 1D array of data points |
| mask | Mask to apply to data (optional) |
| mean | The mean of a data array |
Definition at line 119 of file statistics.f90.
References sufr_kinds::double, mean(), sufr_system::quit_program_error(), and sufr_system::warn().
Referenced by correlation(), mean(), mean_sp(), mean_var_running(), stdev(), and stdev_sp().

| real function sufr_statistics::mean_sp | ( | real, dimension(:), intent(in) | data, |
| logical, dimension(:), intent(in), optional | mask ) |
Compute the mean of a data array - single-precision wrapper for mean()
| data | 1D array of data points |
| mask | Mask to apply to data (optional) |
| mean_sp | The mean of a data array |
Definition at line 158 of file statistics.f90.
References sufr_kinds::double, mean(), mean_sp(), and sufr_system::quit_program_error().
Referenced by mean_sp().

| pure subroutine sufr_statistics::mean_var_running | ( | real(double), intent(inout) | mean, |
| real(double), intent(inout) | var, | ||
| real(double), intent(in) | data, | ||
| integer, intent(in) | num, | ||
| real(double), intent(out), optional | stdev ) |
Compute a running mean and variance by adding a data point and the data point number to existing values. If num=1, initialise. Note that mean and var are I/O variables and cannot be dummy variables or values. Num must be accurate, and increased by one between calls by the user. Optionally, return the standard deviation.
| mean | Running mean (I/O) |
| var | Running variance (I/O) |
| data | New/current data point |
| num | Number of the current data point |
| stDev | Current standard deviation (output; optional) |
Definition at line 408 of file statistics.f90.
References sufr_kinds::double, mean(), and stdev().

| real(double) function sufr_statistics::mean_weight | ( | real(double), dimension(:), intent(in) | data, |
| real(double), dimension(:), intent(in) | wgts, | ||
| logical, dimension(:), intent(in), optional | mask ) |
Compute the weighted mean of a data array.
| data | 1D array of data points |
| wgts | Weights for all data points |
| mask | Mask to apply to data (optional) |
| mean_weight | The weighted mean of a data array |
Definition at line 196 of file statistics.f90.
References sufr_kinds::double, sufr_system::error(), mean_weight(), and sufr_system::quit_program_error().
Referenced by mean_weight(), and stdev_weight().

| real(double) function sufr_statistics::median | ( | real(double), dimension(:), intent(in) | data, |
| logical, dimension(:), intent(in), optional | mask ) |
Compute the median of a data array.
| data | 1D array of data points |
| mask | Mask to apply to data (optional) |
| median | The median of a data array |
Definition at line 37 of file statistics.f90.
References sufr_kinds::double, median(), sufr_system::quit_program_error(), and sufr_sorting::sorted_index_list().
Referenced by median(), and median_sp().

| real function sufr_statistics::median_sp | ( | real, dimension(:), intent(in) | data, |
| logical, dimension(:), intent(in), optional | mask ) |
Compute the median of a data array - single-precision wrapper for median()
| data | 1D array of data points |
| mask | Mask to apply to data (optional) |
| median_sp | The median of a data array |
Definition at line 85 of file statistics.f90.
References sufr_kinds::double, median(), median_sp(), and sufr_system::quit_program_error().
Referenced by median_sp().

| pure real(double) function sufr_statistics::poisson_prob | ( | integer, intent(in) | k, |
| real(double), intent(in) | lambda ) |
Compute the Poisson probability of EXACTLY k events occurring in a fixed interval for a known average rate lambda, and independently of the time since the last event: P = λ^k e^-λ / k!
| k | Number of events |
| lambda | Average event rate |
| poisson_prob | Poisson probability P = λ^k e^-λ / k! |
Definition at line 1167 of file statistics.f90.
References sufr_kinds::double, faculty(), and poisson_prob().
Referenced by poisson_prob(), and poisson_prob_cumul().

| pure real(double) function sufr_statistics::poisson_prob_cumul | ( | integer, intent(in) | k, |
| real(double), intent(in) | lambda ) |
Compute the cumulative Poisson probability of k OR FEWER events occurring in a fixed interval for a known average rate lambda, and independently of the time since the last event: P = Σ(i=0,k) λ^i e^-λ / i!
| k | Number of events |
| lambda | Average event rate |
| poisson_prob_cumul | Cumulative Poisson probability P = Σ(i=0,k) λ^i e^-λ / i! |
Definition at line 1191 of file statistics.f90.
References sufr_kinds::double, poisson_prob(), and poisson_prob_cumul().
Referenced by poisson_prob_cumul().

| subroutine sufr_statistics::prob_range | ( | real(double), dimension(:), intent(in) | data, |
| real(double), intent(in) | range, | ||
| real(double), intent(out) | llim, | ||
| real(double), intent(out) | ulim, | ||
| logical, dimension(:), intent(in), optional | mask ) |
Find a given probability range for a data array - the narrowest range that contains a given fraction of data points.
| data | 1D array of data points |
| range | Probability range - e.g. 0.95 = 95% probability ~ "2-sigma" |
| llim | Lower limit of probability range (output) |
| ulim | Upper limit of probability range (output) |
| mask | Mask to apply to data (optional) |
Definition at line 447 of file statistics.f90.
References sufr_numerics::deq(), sufr_kinds::double, sufr_system::error(), sufr_system::quit_program_error(), sufr_sorting::sorted_index_list(), and sufr_system::warn().
Referenced by prob_range_sp().

| subroutine sufr_statistics::prob_range_sp | ( | real, dimension(:), intent(in) | data, |
| real, intent(in) | range, | ||
| real, intent(out) | llim, | ||
| real, intent(out) | ulim, | ||
| logical, dimension(:), intent(in), optional | mask ) |
Find a given probability range for a data array - the narrowest range that contains a given fraction of data points - single-precision wrapper for prob_range()
| data | 1D array of data points |
| range | Probability range - e.g. 0.95 = 95% probability ~ "2-sigma" |
| llim | Lower limit of probability range (output) |
| ulim | Upper limit of probability range (output) |
| mask | Mask to apply to data (optional) |
Definition at line 521 of file statistics.f90.
References sufr_kinds::double, prob_range(), sufr_system::quit_program_error(), and sufr_sorting::sorted_index_list().

| real(double) function sufr_statistics::stdev | ( | real(double), dimension(:), intent(in) | data, |
| real(double), intent(in), optional | dmean, | ||
| logical, dimension(:), intent(in), optional | mask, | ||
| real(double), intent(out), optional | var ) |
Compute the standard deviation of a data array with mean 'mean'.
| data | 1D array with data points |
| dMean | Mean of the data points (optional; will be computed if not provided) |
| mask | Mask to apply to data (optional) |
| var | Variance of the data (output) |
| stDev | The standard deviation |
Definition at line 250 of file statistics.f90.
References sufr_kinds::double, sufr_system::error(), mean(), sufr_system::quit_program_error(), and stdev().
Referenced by mean_var_running(), stdev(), and stdev_sp().

| real function sufr_statistics::stdev_sp | ( | real, dimension(:), intent(in) | data, |
| real, intent(in) | mean, | ||
| logical, dimension(:), intent(in), optional | mask ) |
Compute the standard deviation of a data array with mean 'mean' - single-precision wrapper for stDev()
| data | 1D array with data points |
| mean | Mean of the data points |
| mask | Mask to apply to data (optional) |
| stDev | The standard deviation |
Definition at line 308 of file statistics.f90.
References sufr_kinds::double, mean(), sufr_system::quit_program_error(), stdev(), and stdev_sp().
Referenced by stdev_sp().

| real(double) function sufr_statistics::stdev_weight | ( | real(double), dimension(:), intent(in) | data, |
| real(double), dimension(:), intent(in) | wgts, | ||
| real(double), intent(in), optional | wmean, | ||
| logical, dimension(:), intent(in), optional | mask ) |
Compute the weighted standard deviation of a data array with weighted mean 'wMean'.
| data | 1D array with data points |
| wgts | Weights for all data points |
| wMean | Weighted mean of the data points (optional) |
| mask | Mask to apply to data (optional) |
| stDev_weight | The weighted standard deviation |
Definition at line 343 of file statistics.f90.
References sufr_kinds::double, sufr_system::error(), mean_weight(), sufr_system::quit_program_error(), and stdev_weight().
Referenced by stdev_weight().
