Menu location: Data_Search & Replace.
This function searches the active worksheet for data that match the conditions you specify. When the condition, for example data > 20, is found then you have the option to replace or simply count the data that match this condition.
Note that you can use the replace function to remove cells or rows from a worksheet by leaving the "replace with" box blank.
Example
The following are data imported from an application which uses -99 as the missing data value:
|
12 |
|
1 |
|
2 |
|
3 |
|
4 |
|
-99 |
|
4 |
|
2 |
|
1 |
|
-99 |
|
-99 |
To replace -99 with StatsDirect missing data you can use the search function with the "search for x" condition set to equal to -99 and the "replace with" entry set to *. To run this example, enter the above data into a workbook column and select that column. Then select search from the data menu. Check the "equal to" option, enter -99 in the "search for x" box and enter * in the "replace with" box. When you click on the OK button the -99 values will be replaced with * and these will also be displayed as an asterisk (missing data) in the workbook.
The match expression option of the StatsDirect search form enables you to select data for an expression which evaluates as true. You use x to denote the data to match, i.e. x ³ 10 and x £ 20 matches all selected data between 10 and 20 inclusive, you can count or replace the matches by clicking the relevant button. You can compose an expression using x and any of the functions, operators and logical expressions below:
|
Constants |
|
|
PI |
3.14159265358979323846 (p) |
|
EE |
2.71828182845904523536 (e) |
|
|
|
|
Arithmetic Functions |
|
|
ABS |
absolute value |
|
CLOG |
common (base 10) logarithm |
|
CEXP |
anti log (base 10) |
|
EXP |
anti log (base e) |
|
LOG or LN |
natural (base e, Naperian) logarithm |
|
LOGIT |
logit: log(p/[1-p]), p=proportion |
|
ALOGIT |
antilogit: exp(l)/[1+exp(l)], l=logit |
|
SQR or SQRT |
square root |
|
! |
factorial (maximum 170.569) |
|
LOG! |
log factorial |
|
IZ |
normal deviate for a p value |
|
UZ |
upper tail p for a normal deviate |
|
LZ |
lower tail p for a normal deviate |
|
TRUNC or FIX |
integer part of a real number |
|
CINT |
real number rounded to nearest integer |
|
INT |
real number truncated to integer closest to zero |
Please note that the largest factorial allowed is 170.569398315538748, but you can work with Log factorials via the LOG! function, e.g. LOG!(171).
|
Arithmetic Operators |
|
|
^ |
exponentiation (to the power of) |
|
+ |
addition |
|
- |
subtraction |
|
* |
multiplication |
|
/ |
division |
|
\ |
integer division |
Calculations give an order of priority to arithmetic operators, this must be considered when entering expressions. For example, the result of the expression "6 - 3/2" is 4.5 and not 1.5 because division takes priority over subtraction.
|
Priority of arithmetic operators in descending order |
|
|
1. |
Exponentiation (^) |
|
2. |
Negation (-X) (Exception = x^-y; i.e. 4^-2 is 0.0625 and not -16) |
|
3. |
Multiplication and Division (*, /) |
|
4. |
Integer Division (\) |
|
5. |
Addition and Subtraction (+, -) |
|
|
|
|
Trigonometric Functions |
|
|
ARCCOS |
arc cosine |
|
ARCCOSH |
arc hyperbolic cosine |
|
ARCCOT |
arc cotangent |
|
ARCCOTH |
arc hyperbolic cotangent |
|
ARCCSC |
arc cosecant |
|
ARCCSCH |
arc hyperbolic cosecant |
|
ARCTANH |
arc hyperbolic tangent |
|
ARCSEC |
arc secant |
|
ARCSECH |
arc hyperbolic secant |
|
ARCSIN |
arc sine |
|
ARCSINH |
arc hyperbolic sine |
|
ATN |
arc tangent |
|
COS |
cosine |
|
COT |
cotangent |
|
COTH |
hyperbolic cotangent |
|
CSC |
cosecant |
|
CSCH |
hyperbolic cosecant |
|
SIN |
sine |
|
SINH |
hyperbolic sine |
|
SECH |
hyperbolic secant |
|
SEC |
secant |
|
TAN |
tangent |
|
TANH |
hyperbolic tangent |
To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.
|
Logical Functions |
|
|
AND |
logical AND |
|
NOT |
logical NOT |
|
OR |
logical OR |
|
< |
less than |
|
= |
equal to |
|
> |
greater than |