A Unified Approach to Measuring Poverty and Inequality

Page 281

Chapter 5: Getting Started with ADePT

Variable Expressions The following operators can be used in expressions: Operator

Description

+ abs = ^

– sign == pow

round min ceiling

truncate max floor

*

sqrt

/

basic mathematical operators equality check operators exponent (e.g., x^2 is x squared), power (e.g., pow(4,2) is 42 = 16), and square root shortening operators range operators

Variable expressions can include constants, and strings can be used for variables that are of type string. Expression examples are as follows: Expression x=1 x=y+z x=y=1 x = 23 if z == . x = Log(y) if z = 1 s = “test”

Description sets all variable x observations to 1 sets variable x observations to y observation plus z observation sets variable x observations to 1 (true) if y is 1; otherwise, sets variable x observations to 0 (false) sets variable x observations to 23 if z is missing ( . ); otherwise, sets to. sets variable x observations to log of y observations if z is 1; otherwise, sets to. sets all variable x observations to the string “test”

Note: The periods ( . ) in the table above represent system-missing values. This symbol is defined in SPSS® and is used to indicate missing data in datasets.

Another example: To simulate the impact on poverty of a 10 percent increase in incomes of households with more than 4 members, replace the existing income variable using this expression: income = income*1.1 if hhsize > 4. Deleting Variables You can remove variables from the working copy of a dataset that ADePT uses for its calculations. This operation does not change the original dataset. Native variables, as well as generated and replaced variables, can be deleted. 1. In the dataset Variables tab, right-click in the row containing the variable you want to delete, then click Drop Variable [variable name] in the pop-up menu. 2. In the Confirmation dialog, click the Yes button.

263


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.