+ All Categories
Home > Documents > 003 Spss Rajon Computing Variables

003 Spss Rajon Computing Variables

Date post: 30-May-2018
Category:
Upload: aahhssaann
View: 223 times
Download: 0 times
Share this document with a friend

of 17

Transcript
  • 8/14/2019 003 Spss Rajon Computing Variables

    1/17

    STATISTICAL PACKAGESSTATISTICAL PACKAGES

    COURSE TEACHER

    S. A. AHSAN RAJONCOMPUTER SCIENCE AND ENGINEERING DISCIPLINE,

    KHULNA UNIVERSITY, KHULNA.

    EMAIL: [email protected]

    WEB: www.cseku.ac.bd/rajon

    www.rajon.forumerzone.com

  • 8/14/2019 003 Spss Rajon Computing Variables

    2/17

    TopicsTopics

    COMPUTING VARIABLES

  • 8/14/2019 003 Spss Rajon Computing Variables

    3/17

    COMPUTE NEW VARIABLE FROM EXISTINGCOMPUTE NEW VARIABLE FROM EXISTING

    It is possible to compute a new variable from oneor more existing variables.

    For example, we may define a new variablegpa_1_2 which will contain the average ygpa of 1styear and 2nd year.

    That is,Gpa_1_2 = (y1_gpa + y2_gpa) / 2

  • 8/14/2019 003 Spss Rajon Computing Variables

    4/17

    COMPUTE NEW VARIABLE FROM EXISTINGCOMPUTE NEW VARIABLE FROM EXISTING

    For the overall purpose, Go toTransform -> compute

  • 8/14/2019 003 Spss Rajon Computing Variables

    5/17

    COMPUTE NEW VARIABLE FROM EXISTINGCOMPUTE NEW VARIABLE FROM EXISTING

    Select the operands from the variable list and use the operatorbuttons as you need in the Compute Variable Window

  • 8/14/2019 003 Spss Rajon Computing Variables

    6/17

    COMPUTE NEW VARIABLE FROM EXISTINGCOMPUTE NEW VARIABLE FROM EXISTING

    HAVE A LOOK.

  • 8/14/2019 003 Spss Rajon Computing Variables

    7/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    BASIC COMMAND:

    NEW VARIABLE = MATHEMATICAL EXPRESSION

    SPSS mathematical expression may includearithmetic operators:

    + Addition - Subtraction

    * Multiplication

    / Division ** Exponential

  • 8/14/2019 003 Spss Rajon Computing Variables

    8/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Mathematical Expression may also containfunctions.

    Arithmetic Functions Statistical Functions

    Logical Functions

  • 8/14/2019 003 Spss Rajon Computing Variables

    9/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Arithmetic Function

    LG10

    10 base Logarithm Eg. lginc= LG10(inc)

    Calculate logarithm of inc and store into variable lginc

    LN

    Base e logarithm

    Eg. lgeinc= LN(inc)

    Calculate e-based logarithm of inc and store into variable

    lgeinc

  • 8/14/2019 003 Spss Rajon Computing Variables

    10/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    STATISTICAL FUNCTION

    SUM

    Calculate Summation totinc = SUM(basic, hsrent,bonus)

    MEAN

    Calculate mean i.e. average.

    avgmark = MEAN(mark1 TO mark5)

    MEAN is used to calculate the average of mark1, mark2,mark3, mark4, mark5.

    The keyword TO can be used to indicate that variables (inorder they are found in the file) in between the twonamed in the command should be included.

  • 8/14/2019 003 Spss Rajon Computing Variables

    11/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    LOGICAL FUNCTIONS

    Logical functions evaluate as TRUE or FALSE.

    IfTRUE, new computed variable will be given the value 1.

    IfFALSE, new computed variable will be given the value 0.

    ANY

    spsscrs = ANY (course, CSE1100, CSE2251, CSE3251, CSE3255)

    RANGE

    passed = RANGE (marks, 40, 100)

    A new variable named passed will be created where, marks with

    values more than 40 and less than 100 will be displayed as 1 and

    all other cases (< 40) will be presented as 0

  • 8/14/2019 003 Spss Rajon Computing Variables

    12/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Here is a look.

    Initially we have this statistics

  • 8/14/2019 003 Spss Rajon Computing Variables

    13/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    GO to

    TRANSFROM

    COMPUTE

  • 8/14/2019 003 Spss Rajon Computing Variables

    14/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Here is theExpression

    Passesd

    =

    RANGE (marks, 40,100)

    Click on OK.

  • 8/14/2019 003 Spss Rajon Computing Variables

    15/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Ya.

    We getthat

  • 8/14/2019 003 Spss Rajon Computing Variables

    16/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    Nowcustomizethat

    according tothis look.

    But HOW????

    Its up toyou.

  • 8/14/2019 003 Spss Rajon Computing Variables

    17/17

    COMPUTING VARIABLESCOMPUTING VARIABLES

    THANKS !!!


Recommended