Difference between revisions of "OpasnetUtils/Interpret"

From Testiwiki
Jump to: navigation, search
m
m (Description)
Line 15: Line 15:
 
| -14,23 || -# || -14.23. Minus in the beginning of entry is interpreted as minus, not a sign for a range.
 
| -14,23 || -# || -14.23. Minus in the beginning of entry is interpreted as minus, not a sign for a range.
 
|----
 
|----
| 50 - 125 ||# - # ||Uniform distribution between 50 and 125
+
| 50 - 125 ||# - # ||Uniform distribution between 50 and 125.
 +
|----
 +
| < 4 || < # || Uniform distribution between 0 and 4.
 
|----
 
|----
 
| -12 345 - -23.56 || -# - -#|| Uniform distribution between -12345 and -23.56.
 
| -12 345 - -23.56 || -# - -#|| Uniform distribution between -12345 and -23.56.
 
|----
 
|----
| 1 - 50 ||# - # || Loguniform distribution between 1 and 50 (Loguniformity is assumed if the ratio of upper to lower is > 100)
+
| 1 - 150 ||# - # || Loguniform distribution between 1 and 150 (Loguniformity is assumed if the ratio of upper to lower is > 100)
 
|----
 
|----
 
| 3.1 ± 1.2 or 3.1 +- 1.2||# ± # or # +- # ||Normal distribution with mean 3.1 and SD 1.2
 
| 3.1 ± 1.2 or 3.1 +- 1.2||# ± # or # +- # ||Normal distribution with mean 3.1 and SD 1.2

Revision as of 20:52, 17 December 2012



Description

Interpret takes a vector or data.frame as argument. And returns a data.frame with certain textual inputs interpreted as probability distributions.

Example Regular expression Interpretation
12 000 # # 12000. Text is interpreted as number if space removal makes it a number.
-14,23 -# -14.23. Minus in the beginning of entry is interpreted as minus, not a sign for a range.
50 - 125 # - # Uniform distribution between 50 and 125.
< 4 < # Uniform distribution between 0 and 4.
-12 345 - -23.56 -# - -# Uniform distribution between -12345 and -23.56.
1 - 150 # - # Loguniform distribution between 1 and 150 (Loguniformity is assumed if the ratio of upper to lower is > 100)
3.1 ± 1.2 or 3.1 +- 1.2 # ± # or # +- # Normal distribution with mean 3.1 and SD 1.2
2.4 (1.8 - 3.0) # (# - #) Normal distribution with mean 2.4 and 95 % confidence interval from 1.8 to 3.0
2.4 (2.0 - 3.2) # (# - #) Lognormal distribution with mean 2.4 and 95 % confidence interval from 2.0 to 3.0. Lognormality is assumed if the difference from mean to upper limit is => 50 % greater than from mean to lower limit.
0:0.5:1 #:#:# Triangular distribution. Inputs are always sorted so order of arguments doesn't matter.

Code

https://www.opasnet.org/svn/opasnet_utils/trunk/R/Interpret.r

See also