Statistics::ROC 0.04 
Date Added: July 20, 2010  Visits: 909 


Statistics::ROC is a Perl module with receiveroperatorcharacteristic (ROC) curves with nonparametric confidence bounds. SYNOPSIS use Statistics::ROC; my ($y) = loggamma($x); my ($y) = betain($x, $p, $q, $beta); my ($y) = Betain($x, $p, $q); my ($y) = xinbta($p, $q, $beta, $alpha); my ($y) = Xinbta($p, $q, $alpha); my (@rk) = rank($type, @r); my (@ROC) = roc($model_type,$conf,@val_grp); This program determines the ROC curve and its nonparametric confidence bounds for data categorized into two groups. A ROC curve shows the relationship of probability of false alarm (xaxis) to probability of detection (yaxis) for a certain test. Expressed in medical terms: the probability of a positive test, given no disease to the probability of a positive test, given disease. The ROC curve may be used to determine an optimal cutoff point for the test. The main function is roc(). The other exported functions are used by roc(), but might be useful for other nonparametric statistical procedures. loggamma This procedure evaluates the natural logarithm of gamma(x) for all x>0, accurate to 10 decimal places. Stirlings formula is used for the central polynomial part of the procedure. For x=0 a value of 743.746924740801 will be returned: this is loggamma(9.9999999999E324). betain Computes incomplete beta function ratio Remarks: Complete beta function: B(p,q)=gamma(p)*gamma(q)/gamma(p+q) log(B(p,q))=ln(gamma(p))+ln(gamma(q))ln(gamma(p+q)) Incomplete beta function ratio: I_x(p,q)=1/B(p,q) * int_0^x t^{p1}*(1t)^{q1} dt > log(B(p,q)) has to be supplied to calculate I_x(p,q) log denotes the natural logarithm $beta = log(B(p,q)) $x = x $p = p $q = q The subroutine returns I_x(p,q). If an error occurs a negative value {1,2} is returned. Betain Computes the incomplete beta function by calling loggamma() and betain(). xinbta Computes inverse of incomplete beta function ratio Remarks: Complete beta function: B(p,q)=gamma(p)*gamma(q)/gamma(p+q) log(B(p,q))=ln(gamma(p))+ln(gamma(q))ln(gamma(p+q)) Incomplete beta function ratio: alpha = I_x(p,q) = 1/B(p,q) * int_0^x t^{p1}*(1t)^{q1} dt > log(B(p,q)) has to be supplied to calculate I_x(p,q) log denotes the natural logarithm $beta = log(B(p,q)) $alpha= I_x(p,q) $p = p $q = q The subroutine returns x. If an error occurs a negative value {1,2,3} is returned. Xinbta Computes the inverse of the incomplete beta function by calling loggamma() and xinbta(). rank Computes the ranks of the values specified as the second argument (an array). Returns a vector of ranks corresponding to the input vector. Different types of ranking are possible (high, low, mean), and are specified as first argument. These differ in the way ties of the input vector, i.e. identical values, are treated: high: replace ranks of identical values with their highest rank low: replace ranks of identical values with their lowest rank mean: replace ranks of identical values with the mean of their ranks roc Determines the ROC curve and its nonparametric confidence bounds. The ROC curve shows the relationship of "probability of false alarm" (xaxis) to "probability of detection" (yaxis) for a certain test. Or in medical terms: the "probability of a positive test, given no disease" to the "probability of a positive test, given disease". The ROC curve may be used to determine an "optimal" cutoff point for the test. The routine takes three arguments: (1) type of model: decrease or increase, this states the assumption that a higher (increase) value of the data tends to be an indicator of a positive test result or for the model decrease a lower value. (2) twosided confidence interval (usually 0.95 is chosen). (3) the data stored as a listoflists: each entry in this list consits of an "value / true group" pair, i.e. value / disease present. Group values are from {0,1}. 0 stands for disease (or signal) not present (prior knowledge) and 1 for disease (or signal) present (prior knowledge). Example: @s=([2, 0], [12.5, 1], [3, 0], [10, 1], [9.5, 0], [9, 1]); Notice the small overlap of the groups. The optimal cutoff point to separate the two groups would be between 9 and 9.5 if the criterion of optimality is to maximize the probability of detection and simultaneously minimize the probability of false alarm. Returns a listoflists with the three curves: @ROC=([@lower_b], [@roc], [@upper_b]) each of the curves is again a listoflists with each entry consisting of one (x,y) pair. Examples: $,=" "; print loggamma(10), "n"; print Xinbta(3,4,Betain(.6,3,4)),"n"; @e=(0.7, 0.7, 0.9, 0.6, 1.0, 1.1, 1,.7,.6); print rank(low,@e),"n"; print rank(high,@e),"n"; print rank(mean,@e),"n"; @var_grp=([1.5,0],[1.4,0],[1.4,0],[1.3,0],[1.2,0],[1,0],[0.8,0], [1.1,1],[1,1],[1,1],[0.9,1],[0.7,1],[0.7,1],[0.6,1]); @curves=roc(decrease,0.95,@var_grp); print "$curves[0][2][0] $curves[0][2][1] n";.

License: Freeware  Size: 17.41 KB 
Libraries

Apache::TestTieBucketBrigade 0.03
Apache::TestTieBucketBrigade is a Perl module to test Apache::TieBucketBrigade, takes a bunch of stuff and then writes it back upcased. It tests stuff. I suppose you could use it as an example of building things with Apache::TieBucketBrigade.... 
4.1 KB  
Libraries

Statistics::Gap 0.10
Statistics::Gap Perl module is an adaptation of the Gap Statistic. SYNOPSIS use Statistics::Gap; $predictedk = &gap("prefix", "vec", INPUTMATRIX, "rbr", "h2", 30, 10, rep, 90, 4); OR use Statistics::Gap; $predictedk = &gap("prefix",... 
2.5 MB  
Libraries

Test::Data 1.20
Test::Data is a Perl module to test functions for particular variable types. SYNOPSIS use Test::Data qw(Scalar Array Hash Function); Test::Data provides utility functions to check properties and values of data and variables. Functions... 
8.19 KB  
Libraries

List::Util 1.19
List::Util Perl module contains a selection of generalutility list subroutines. SYNOPSIS use List::Util qw(first max maxstr min minstr reduce shuffle sum); List::Util contains a selection of subroutines that people have expressed would be... 
44.03 KB  
Libraries

PHP::Strings 0.28
PHP::Strings is a Perl module to implement some of PHPs string functions. SYNOPSIS use PHP::Strings; my $slashed = addcslashes( $not_escaped, $charlist ); my $wordcount = str_word_count( $string ); my @words = str_word_count( $string, 1 );... 
78.85 KB  
Libraries

Test::Cmd 1.05
Test::Cmd is a Perl module for portable testing of commands and scripts. SYNOPSIS use Test::Cmd; $test = Test::Cmd>new(prog => program_or_script_to_test, interpreter => script_interpreter, string => identifier_string, workdir => ,... 
30.72 KB  
Libraries

WAIT 1.800
WAIT Perl module is a rewrite of the freeWAISsf engine in Perl and XS. The central idea of the system is to provide a framework and the building blocks for any indexing and search system the users might want to build. Obviously the framework... 
98.3 KB  
Libraries

Test::Stochastic 0.03
Test::Stochastic is a Perl module to check probabilities of randomized methods. SYNOPSIS use Test::Stochastic qw(stochastic_ok); stochastic_ok sub { ...random sub...}, {a => 0.4, b => 0.6}; stochastic_ok {a => 0.4, b => 0.6}, sub { ...random... 
4.1 KB  
Libraries

Acme::Test::Weather 0.2
Acme::Test::Weather is a Perl module to test the weather conditions for a user. SYNOPSIS use Test::Weather; plan tests => 2; # You may only install something # when its nice outside. &isnt_snowing(); &isnt_cloudy(); # output: 1..2... 
5.12 KB  
Libraries

Test::Exception 0.25
Test::Exception is a Perl module to test exception based code. SYNOPSIS use Test::More tests => 5; use Test::Exception; # or if you dont need Test::More use Test::Exception tests => 5; # then... # Check that something died dies_ok {... 
11.26 KB 
Programming

FLEXdb Digital Asset Manager 3.0.9
FLEXdb  an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEXdb has a JSP client, Java app server for file input and output and an EJB metadata... 
21.57 MB  
Programming

Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom ICR8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based.... 
20.48 KB  
Programming

dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and... 
327.68 KB  
Programming

Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations. 
471.04 KB  
Programming

libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems. 
143.36 KB  
Libraries

wolfSSL 3.12.2
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments  primarily because of its small size, speed, and feature set. It is commonly used in standard operating... 
2.73 MB  
Libraries

EuGTK 4.8.9
Makes it easy to develop good looking, fast, crossplatform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straightforward syntax. EuGTK allows programming in a clean, objectoriented... 
10.68 MB  
Libraries

Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable. 
5.35 KB  
Libraries

Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse>new( join("", ) ); $info = $parser>required;... 
8.19 KB  
Libraries

sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cppalike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also... 
10.24 KB 