Data Manipulation and Scale Creation: Creating Attitude and Knowledge Scales, Lab Reports of Geriatrics

Instructions for university students on how to create attitude and knowledge scales using sas or stata software. Various techniques for summing, averaging, and counting correct responses to create scales. It also includes examples of creating attitude scales using the 'evaltxt2' dataset and creating a knowledge index by counting correct responses.

Typology: Lab Reports

Pre 2010

Uploaded on 11/08/2009

koofers-user-5mo
koofers-user-5mo 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Due Date: 10/06/05
PM 536: Lab 5
Data Manipulation and Scale Creation
These exercises are designed to demonstrate techniques for inspecting,
cleaning, labeling and manipulating data. Scale building is also demonstrated; it
is a technique that enables the data analyst to provide more reliable and valid
measures of study concepts such as attitude or knowledge. Chapters 8 & 9 will
provide useful background for this lab.
1. Creating an attitude scale by adding
Begin by opening a log in which you can save your results for this laboratory
exercise.
1. Use the “evaltxt2” data from blackboard. (This dataset is a 2-wave cross-
sectional survey administered to students in undergraduate courses half of whom
were exposed to a nutrition intervention.)
2. Inspect the attitude items in the data that are questions 1 through 14. Use
the “proc freq” command in SAS or “d q1-q14*” in STATA to see the
variable names and labels. Verify that the data are valid by inspecting the
range and number of observations for each.
3. Create a new variable by summing the responses to these 14 questions
with the following command:
attit_1=q1+q2+q3+q4+q5+q6+q7+q8+q9+q10+q11+q12+q13+q14
Notice that this command might generate some missing values if a respondent
has missing data for any one of the questions. (Later we’ll review ways to avoid
having missing cases in this type of situation.)
4. What is the mean, mode, range, and standard deviation of the new
variable attitude?
5. Label the new variable with a descriptor.
6. Now perform the same functions on a second attitude variable called
“att_1" consisting of question 1 through 6. Find the mean, mode range
and standard deviation of the new variable that you created.
pf3

Partial preview of the text

Download Data Manipulation and Scale Creation: Creating Attitude and Knowledge Scales and more Lab Reports Geriatrics in PDF only on Docsity!

Due Date: 10/06/

PM 536: Lab 5

Data Manipulation and Scale Creation

These exercises are designed to demonstrate techniques for inspecting, cleaning, labeling and manipulating data. Scale building is also demonstrated; it is a technique that enables the data analyst to provide more reliable and valid measures of study concepts such as attitude or knowledge. Chapters 8 & 9 will provide useful background for this lab.

  1. Creating an attitude scale by adding Begin by opening a log in which you can save your results for this laboratory exercise.
  2. Use the “evaltxt2” data from blackboard. (This dataset is a 2-wave cross- sectional survey administered to students in undergraduate courses half of whom were exposed to a nutrition intervention.)
  3. Inspect the attitude items in the data that are questions 1 through 14. Use the “proc freq” command in SAS or “d q1-q14*” in STATA to see the variable names and labels. Verify that the data are valid by inspecting the range and number of observations for each.
  4. Create a new variable by summing the responses to these 14 questions with the following command: attit_1=q1+q2+q3+q4+q5+q6+q7+q8+q9+q10+q11+q12+q13+q Notice that this command might generate some missing values if a respondent has missing data for any one of the questions. (Later we’ll review ways to avoid having missing cases in this type of situation.)
  5. What is the mean, mode, range, and standard deviation of the new variable attitude?
  6. Label the new variable with a descriptor.
  7. Now perform the same functions on a second attitude variable called “att_1" consisting of question 1 through 6. Find the mean, mode range and standard deviation of the new variable that you created.
  1. Creating an attitude scale by summing
  2. Create a new variable by summing the responses to the question 1 through 14 with the following command: egen attit_1a=rsum(q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14)
  3. What is the mean, mode, range, and standard deviation for both variables, “attit_1” and “attit_1a"?
  4. Label the “attit” variable with a descriptor.
  5. Creating an attitude scale by taking the averages
  6. Create a new variable by averaging the responses to questions 16 a through g with the following command: egen attit_1b=rmean(q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14)
  7. What is the mean, mode, range, and standard deviation of the new attitude variable.
  8. Label the new variable. In the attitude scales created above, we were able to add the questionnaire responses together, this procedure being quite common for scale building. Indices, however, are created by counting the number of conditions (such as the number of correct answers in a knowledge test). For example, a count of the number of modern contraceptives that respondents are aware of would constitute an index of awareness and would be created in the same way as that specified for the attitude scale examples above. Many times, however, we need to create indices of correct responses such as in a knowledge test. In such cases we need to evaluate each question separately.
  9. Creating a knowledge index by taking the number correct
  10. Inspect the responses to questions 18, 19, 20 and 21.
  11. Create a new variable which records the number of correct responses to questions 18, 19 20 and 21. gen correct_1 = (q18==2)+ (q219==3) + (q20==4) + (q21==5)