PHP Класс MathPHP\Statistics\Experiment

Показать файл Открыть проект

Открытые методы

Метод Описание
likelihoodRatio ( integer $a, integer $b, integer $c, integer $d ) : array Likelihood ratio Computes positive and negative likelihood ratios from a, b, c, d variables.
likelihoodRatioSS ( float $sensitivity, float $specificity ) : array Likelihood ratio Computes positive and negative likelihood ratios from sensitivity and specificity.
oddsRatio ( integer $a, integer $b, integer $c, integer $d ) : array Odds ratio (OR) Computes odds ratio and 95% confidence ratio.
riskRatio ( integer $a, integer $b, integer $c, integer $d ) : array Risk ratio (relative risk) - RR Computes risk ratio and 95% confidence interval.

Описание методов

likelihoodRatio() публичный статический Метод

Used to analyze the goodness of a diagnostic tests. https://en.wikipedia.org/wiki/Likelihood_ratios_in_diagnostic_testing a / (a + c) LL+ = ----------- b / (b + d) c / (a + c) LL- = ----------- d / (b + d)
public static likelihoodRatio ( integer $a, integer $b, integer $c, integer $d ) : array
$a integer Exposed and event present
$b integer Exposed and event absent
$c integer Non-exposed and event present
$d integer Non-exposed and event absent
Результат array [ LL+, LL- ]

likelihoodRatioSS() публичный статический Метод

Used to analyze the goodness of a diagnostic tests. https://en.wikipedia.org/wiki/Likelihood_ratios_in_diagnostic_testing sensitivity LL+ = --------------- 1 - specificity 1 - sensitivity LL- = --------------- specificity
public static likelihoodRatioSS ( float $sensitivity, float $specificity ) : array
$sensitivity float
$specificity float
Результат array [ LL+, LL- ]

oddsRatio() публичный статический Метод

Ratio which quantitatively describes the association between the presence/absence of "A" and the presence/absence of "B" for individuals in the population. https://en.wikipedia.org/wiki/Odds_ratio http://www.bmj.com/content/343/bmj.d2304 a / b OR = ----- c / d Standard error of the log odds ratio: ______________ 1 1 1 1 SS{ln(OR)} = / - + - - - + - √ a b c d CI Range(95%) = exp( ln(OR) - z × SS{ln(OR)} ) to exp( ln(OR) + z × SS{ln(OR)} ) P = exp((-0.717 * z) - (0.416 * z²))
public static oddsRatio ( integer $a, integer $b, integer $c, integer $d ) : array
$a integer Exposed and event present
$b integer Exposed and event absent
$c integer Non-exposed and event present
$d integer Non-exposed and event absent
Результат array [ OR, ci_lower_bound, ci_upper_bound, p ]

riskRatio() публичный статический Метод

The ratio of the probability of an event occurring in an exposed group to the probability of the event occurring in a comparison, non-exposed group. https://en.wikipedia.org/wiki/Relative_risk http://www.bmj.com/content/343/bmj.d2304 P(event when exposed) a / (a + b) RR = ------------------------- = ----------- P(event when non-exposed) c / (c + d) Standard error of the log relative risk: ______________________ 1 1 1 1 SS{ln(RR)} = / - + - - ----- - ----- √ a c a + b c + d CI Range(95%) = exp( ln(RR) - z × SS{ln(RR)} ) to exp( ln(RR) + z × SS{ln(RR)} ) P = exp((-0.717 * z) - (0.416 * z²))
public static riskRatio ( integer $a, integer $b, integer $c, integer $d ) : array
$a integer Exposed and event present
$b integer Exposed and event absent
$c integer Non-exposed and event present
$d integer Non-exposed and event absent
Результат array [ RR, ci_lower_bound, ci_upper_bound, p ]