******************* 

This script calculates s, m, and g for CI and RI for only one configuration. 

******************* 
 
You should give names of files in the following order, as four arguments: 

 arg1 = data file with one configuration 
 arg2 = tree file with the optimal tree based on as many characters as possible 
 arg3 = tree file with a bush 
 arg4 = tree file with the optimal tree based on one configuration alone
...
Copy and paste the following text and save the file as LMstats.run 
syntax is >run script-name.run arg1 arg2 arg3 arg4;
 
 ................. script starts here............ 

 
 

 

 

macro= ;
log stats.out;
sil-all;

quote 
*******************
This script calculates s, m, and g for CI and RI for only one configuration.
You should LOAD files in the following order:
  1 = data file with one configuration
  2 = tree file with the optimal tree based on as many characters as possible 
  3 = tree file with a bush
  4 = tree file with the optimal tree based on one configuration alone

*******************

 ; 


var :
best_score
scor_bush 
scor_min
numerator
denominator
CI
RI
arbol

;

set best_score lmscore [ 0 ]; /* s */
set scor_bush lmscore [1]; /* g */
set scor_min lmscore [2];  /* m */
set numerator ('scor_bush' -  'best_score');  /* g - s */
set denominator ('scor_bush' -  'scor_min'); /* g - m */

set CI ('scor_min' / 'best_score');
set RI ('numerator'  / 'denominator');

quote * 

-->Stats for landmark data 

Here are the values of s, m, g,  CI,  and RI 
for one configuration :

*** actual steps on best tree  (s) = 'best_score' 
*** minimum steps on a bush    (g) = 'scor_bush'  
*** minimum possible steps     (m) = 'scor_min'

* * ** * * * * * CI (m / s)     = 'CI'  
* * ** * * * * * RI (g-s / g-m) = 'numerator' / 'denominator' =  'RI'  
;

quote * 
>Additionally, the values for each landmark point, for each tree, were also saved to file stats.out;



lmark lscores 0 ;

lmark lscore 1 ;

lmark lscore 2;
;
end

proc/ ;