Các phép biến đổi và thao tác trên tập dữ liệu trong SPSS

34 32 0
Các phép biến đổi và thao tác trên tập dữ liệu trong SPSS

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ĐẠI HỌC TÀI CHÍNH - MARKETING HƯỚNG DẪN SỬ DỤNG SPSS Ngơ Thái Hưng CÁC PHÉP BIẾN ĐỔI VÀ THAO TÁC TRÊN TẬP DỮ LIỆU Mã hóa lại (Recode) • Recode công cụ dùng để mã hóa lại giá trị biến thành giá trị mã hóa phù hợp với đòi hỏi trình phân tích liệu • SPSS cung cấp cho ta hai loại Recode Recode biến (Recode into same variables) recode vào biến khác (Recode into different variable) • Mã hóa lại (Recode) • Mã hóa lại biến (Recode into same variables) • Recode biến mã hóa lại giá trị biến hữu thành giá trị giá trị nằm biến hữu thay giá trị củ biến Mã hóa lại (Recode) • Chọn transform/recode từ menu Ở ta lựa chọn Recode into same variable để tiến hành định lại giá trị biến biến Mã hóa lại (Recode) • Chuyển biến cần mã hóa lại sang hộp thoại variables, nhấn Old and New Values để chuyển giá trị củ cần thay đổi thành giá trị Ta có hộp thoại Old and New values Mã hóa lại (Recode) • Old value dùng để khai báo giá trị củ cần chuyển đổi Giá trị củ giá trị đơn lẻ(Value), giá trị khuyết mặc định hay giá trị khuyết khai báo (System-missing or Usermissing), dãy giá trị (Range), toàn giá trị biến (All other values) New value dùng để khai báo giá trị thay cho giá trị củ tương ứng Nhấn Add để lưu chuyển đổi Các giá trị chuyển đổi sửa chửa loại bỏ cách di chuyển vệt tối đến biểu thức thể chuyển đổi hộp thoại Old->New nhấn Change cho thay đổi Remove để loại bỏ Mã hóa lại (Recode) • Mã hóa lại vào biến khác (Recode into different variables) • Trong trường hợp định lại giá trị biến thành giá trị biến ta lựa chọn transform/recode/into different variable Mã hóa lại (Recode) • Chuyển tên biến cần định lại giá trị vào hộp thoại variables Khai báo tên biến nhãn biến chứa giá trị vừa mã hóa lại hộp thoại Output variable Nhấn change để xác nhận khái báo • Các công cụ If Old and New Values có ý nghóa thao tác tương tự trường hợp định lại giá trị cho biến, đề cập phần Lựa chọn quan sát (Select Cases) • Công cụ Select Cases đưa vài phương pháp cho phép ta lựa chọn nhóm nhỏ trường hợp quan sát dựa tiêu chuẩn hay điều kiện cụ thể • Chọn Data/select cases từ menu Thêm vào biến (Add Variables) • Data/Merge Files/Adds Variables từ menu, SPSS truy suất hộp thoại Add Variables: Read File để ta lựa chọn tập liệu hợp với tập liệu hoạt động Nhấn Open để xác nhận việc lựa chọn Thêm vào biến (Add Variables) • Excluded Variables liệt kê biến bị loại trừ khỏi biến hợp thành Những biến biến có tên biến giống Biến tập tin hoạt động ký hiệu (*), biến tập tin bên (+) Nếu muốn biến giống tên có tập liệu ta phải tiến hành rename lại chuyển sang hộp thoại chứa biến có tập tin (New Working Data File) • Key Variables Biến khóa dựa vào quan sát giống xác định Chú ý biến khóa phải có tên hai tập tin cần hợp Các trường hợp không thỏa mãn với biến khóa bao hàm tập liệu không hợp với trường hợp tập tin khác EDITING AND HANDLING DATA Correcting entries: Click on the cell, type in the correct entry and press enter Deleting entries: To delete an entry for a cell, click in the cell and press delete (Remember the useful Undo icon) Copying cells, columns and rows: Cells, columns and rows can be copied by first highlighting then the using the Edit copy menu, or Ctr-c EDITING AND HANDLING DATA • Correcting entries: Click on the cell, type in the correct entry and press enter • Deleting entries: To delete an entry for a cell, click in the cell and press delete (Remember the useful Undo icon) • Copying cells, columns and rows: Cells, columns and rows can be copied by first highlighting then the using the Edit copy menu, or Ctr-c Move to where you want them copied and use Edit > Paste or Ctr-v EDITING AND HANDLING DATA • Inserting a variable (a column): Click on the top of the column to the right of where you want the new column to appear, use the Insert Column icon (or right click ) • Use Edit > insert Variable EDITING AND HANDLING DATA • Inserting a case (a row) : the same as inserting column, you can replace column by row • Moving columns: You can drag and drop columns to wherever you like- highlight them first EDITING AND HANDLING DATA • Sorting data You can sort the data Data > Sort Cases Click on the arrow to transfer it to the Sort by box OK Sorting can be Ascending or Descending EDITING AND HANDLING DATA • Saving data and output: Data and output have to be saved separately File > Save in the appropriate window Exporting Output: I have talked it before • Saving Data as an Excel file: Use Save Data As • Copying tables and charts into Word: Use Edit > Copy and in Word use Edit > Paste EDITING AND HANDLING DATA • Printing from SPSS: Remember that you need to save your output first You can print directly from the Viewer window using File > Print Output that you don’t want can be hidden by clicking on the icons in the left hand pane RECODING INTO GROUPS You will find it very useful to be able to recode data (1991 U.S) data includes the number of brothers and sisters each respondent has in the column headed siblings Use Analyze > Descriptive Statistics > frequencies RECODING INTO GROUPS It might be useful to regroup the data into subgroups and give each group a numerical code As an example example I suggest recoding the student into groups: Those with no brothers or sisters Group1 Those with 1,2 or brothers or sisters Group Those with or more brothers or sisters Group RECODING INTO GROUPS Use Transform > Recode into Different Variables Name the new variable Type in the Label Click on Old and New Values to get the next dialogue box: RECODING INTO GROUPS Group 1: Group 2: Group 3: Continue > Ok DOING CALCULATIONS ON VARIABLES • Calculations can easily be done in SPSS using Transform > Compute Variable • An example SELECTING A SUBSET • During your investigations you may want to look only at the data for the males or females Using Data > Select Cases > If condition is satisfied , click on the If …button under if condition is satisfied….Continue select Filter out unselected cases OK (Try a frequency table and you can see what you get) ... Add Cases cho phép ta hợp liệu tập liệu hoạt động với liệu tập liệu bên ngoài, với điều kiện tập liệu phải chứa biến giống biến tập liệu hoạt động Data/Merge Files/Adds Cases Hợp tập liệu (Merge...CÁC PHÉP BIẾN ĐỔI VÀ THAO TÁC TRÊN TẬP DỮ LIỆU Mã hóa lại (Recode) • Recode công cụ dùng để mã hóa lại giá trị biến thành giá trị mã hóa phù hợp với đòi hỏi trình phân tích liệu • SPSS cung... Variables liệt kê biến bị loại trừ khỏi biến hợp thành Những biến biến có tên biến giống Biến tập tin hoạt động ký hiệu (*), biến tập tin bên (+) Nếu muốn biến giống tên có tập liệu ta phải tiến

Ngày đăng: 24/08/2021, 22:18

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan