thongke.info
Đang tải dữ liệu...

  
Trang chủGiới thiệuPhương pháp luậnQuản lý, phân tích số liệuCơ sở dữ liệu, xuất bản phẩmĐào tạo và tư vấnDiễn đàn
Quản lý số liệu (Data management)
Nhập liệuXử lý số liệu
Gộp data files bằng SPSS
Trang chủ  >  Quản lý, phân tích số liệu  >  Quản lý số liệu (Data management)  >  Nhập liệu  >  Kết hợp các bộ số liệu (Combine data files)  >  Gộp data files bằng SPSS

Gộp data files (Merge data)

Xin chào các bạn,

Xin giới thiệu lệnh gộp data files cơ bản trong SPSS.

GET FILE='C:\temp\data1.sav'.
Sort cases by id.
***Match the active data1 with data2 ***.
match files file=*/in=demo/file='C:\temp\data2.sav'/in=zip/by id.
execute.
****check contribution from both files to matched file***.
****by cross-tabulation zip by demo***.
crosstabulation zip by demo.
select if (demo=1 and zip=1).
SAVE OUTFILE='C:\temp\data_merge.sav'.

Ví dụ: Khi chúng ta muốn gộp 2 bộ số liệu ch_b25b31ch_b10b31. 2 bộ số liệu có chung 1 biến là childid.

Các bạn sẽ làm theo các bước như sau:

*re-merge files and create a new child file with all variables.

Save outfile='C:\VNAS Data\ch_b25b31 wcores.sav'.

get file ='C:\VNAS Data\ch_b10b24.sav'.

MATCH FILES /FILE=* /FILE='C:\VNAS Data\ch_b25b31 wcores.sav'

/RENAME (chnum qid = d0 d1) /BY childid /DROP= d0 d1.

SAVE OUTFILE='C:\VNAS Data\ch_b10b31 wcores.sav'.

get file='C:\VNAS Data\ch_b10b31 wcores.sav'.



Số lượt đọc:  1142  -  Cập nhật lần cuối:  23/08/2012 03:45:32 PM