Á¦¸ñ
°¡±¸ÀڷḦ Á¾À¸·Î ¿¬µµº° ÇÕÄ¡´Â ¹æ¹ý
ÀÛ¼ººÎ¼­
ÆгÎÁ¶»çÆÀ
µî·ÏÀÏ
2011/01/03
Á¶È¸¼ö
2875
³»¿ë
 

ºÐ¼®À» À§Çؼ­´Â °¡±¸ÀڷḦ Á¾À¸·Î ºÙ¿©¾ß ÇÏ´Â °æ¿ì°¡ ÀÚÁÖ ÀÖ´Ù. ÀÌ °æ¿ì °¢ Â÷¼öº°·Î °øÅë Ç׸ñÀ» ÃøÁ¤ÇÏ´Â º¯¼ö¸¦ ÃßÃâÇÑ µÚ º¯¼ö¸íÀ» ÅëÀÏ ½ÃŲ ÈÄ Á¾À¸·Î ºÙÀÌ¸é µÈ´Ù.


  ¿¹¸¦ µé¾î °¡±¸ÀڷḦ Á¾À¸·Î ÇÕÄ¡´Â °æ¿ì, ´ÙÀ½°ú °°Àº ÀýÂ÷¸¦ µû¸¥´Ù.


¨ç °¢ Â÷¼ö º°·Î °øÅë Ç׸ñÀ» ÃøÁ¤ÇÏ´Â º¯¼öµéÀ» ÃßÃâÇÑ´Ù.

¨è °¢ ¿¬µµ¿¡ ÀÀ´äÇÑ ÄÉÀ̽ºµé¸¸ ÃßÃâÇÑ´Ù. ¿¹¸¦ µé¾î 3Â÷³âµµ °¡±¸ÀÚ·áÀÇ °æ¿ì Á¶»ç¿¡ Âü¿©ÇÏÁö ¾ÊÀº °æ¿ì w03hid°¡ °áÃøÀ̹ǷΠÀÌ·± ÄÉÀ̽º¸¦ »èÁ¦ÇÑ´Ù. (¶Ç´Â w03hsvy°¡ 1ÀÎ ÄÉÀ̽º¸¦ ÃßÃâÇÑ´Ù.)

¨é °øÅëÇ׸ñÀ» ÃøÁ¤ÇÏ´Â º¯¼öµéÀÇ º¯¼ö ¸íÀ» µ¿ÀÏÇÏ°Ô ÅëÀϽÃŲ´Ù.

¨ê °¢ Â÷¼öº°·Î ±¸ºÐÇÒ ¼ö ÀÖ´Â ´õ¹Ì º¯¼ö¸¦ ¸¸µç´Ù.

¨ë °¢°¢ÀÇ ÀڷḦ Á¾À¸·Î ÇÕÄ£´Ù.



/* sas Set¹® È°¿ë */ 

data h01; set k.kreish01;

keep hid w01hid h01d001 h01d002 dummy;     /*1Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

if w01hid^=.;

rename h01d001=d001                          /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

h01d002=d002;

dummy=1; run;                                /* ´õ¹Ìº¯¼ö »ý¼º*/


data h02; set k.kreish02;

keep hid w01hid w02hid h02d001 h02d002 dummy;  /*2Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

if w02hid^=.;

rename h02d001=d001                              /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

h02d002=d002;

dummy=2; run;                                    /* ´õ¹Ìº¯¼ö »ý¼º*/


data h03; set k.kreish03;            /*3Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

keep hid  w01hid w02hid w03hid  h03d001 h03d002 dummy;

if w03hid^=.;

rename h03d001=d001              /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

h03d002=d002;

dummy=3; run;                    /* ´õ¹Ìº¯¼ö »ý¼º*/


data hw1;

retain hid  w01hid w02hid w03hid d001 d002 dummy;

set h01 h02 h03;             /*ÆÄÀÏ Á¾À¸·Î ÇÕÄ¡±â*/

run;



/* spss Add¹® È°¿ë */   

get file='D:\KReIS\SPSS\kreish01.sav'

/keep=hid w01hid h01d001 h01d002            /*1Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

/rename=(h01d001=d001) (h01d002=d002).        /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

select if w01hid~=sysmis(w01hid).

compute dummy=1.                             /* ´õ¹Ìº¯¼ö »ý¼º*/

save out ='D:\KReIS\SPSS\h01.sav'

compressed.


get file='D:\KReIS\SPSS\kreish02.sav'

/keep=hid w01hid w02hid h02d001 h02d002      /*2Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

/rename=(h02d001=d001) (h02d002=d002).         /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

select if w02hid~=sysmis(w02hid).

compute dummy=2.                              /* ´õ¹Ìº¯¼ö »ý¼º*/

save out ='D:\KReIS\SPSS\h02.sav'

compressed.


get file='D:\KReIS\SPSS\kreish03.sav'

/keep=hid w01hid w02hid w03hid h03d001 h03d002  /*3Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

/rename=(h03d001=d001) (h03d002=d002).             /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

select if w03hid~=sysmis(w03hid).

compute dummy=3.                                  /* ´õ¹Ìº¯¼ö »ý¼º*/

save out ='D:\KReIS\SPSS\h03.sav'

compressed.


add files /file='D:\KReIS\SPSS\h01.sav'           /*ÆÄÀÏ Á¾À¸·Î ÇÕÄ¡±â*/

/file='D:\KReIS\SPSS\h02.sav'

/file='D:\KReIS\SPSS\h03.sav'.

exe.

save out ='D:\KReIS\SPSS\hw1.sav'

compressed.





/* stata Append¹® È°¿ë */ 

use "D:\KReIS\STATA\kreish01.dta", clear

gen dummy=1                                /*´õ¹Ìº¯¼ö »ý¼º*/

keep hid w01hid h01d001 h01d002 dummy     /*1Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

rename h01d001 d001                         /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

rename h01d002 d002

keep if w01hid~=.

save "D:\KReIS\STATA\h01.dta", replace


use "D:\KReIS\STATA\kreish02.dta", clear

gen dummy=2                              /*´õ¹Ìº¯¼ö »ý¼º*/

keep hid w01hid w02hid h02d001 h02d002 dummy   /*2Â÷³âµµ °¡±¸ ÀÚ·á¿¡¼­ ÇÊ¿äÇÑ º¯¼ö¸¸ ÃßÃâ*/

rename h02d001 d001                        /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

rename h02d002 d002

keep if w02hid~=.

save "D:\KReIS\STATA\h02.dta", replace


use "D:\KReIS\STATA\kreish03.dta", clear

gen dummy=3                             /*´õ¹Ìº¯¼ö »ý¼º*/

keep hid  w01hid w02hid w03hid  h03d001 h03d002 dummy

rename h03d001 d001                      /*µ¿ÀÏÇÑ º¯¼ö ¸íÀ¸·Î º¯°æ*/

rename h03d002 d002

keep if w03hid~=.

save "D:\KReIS\STATA\h03.dta", replace


use "D:\KReIS\STATA\h01.dta", clear       /*ÆÄÀÏ Á¾À¸·Î ÇÕÄ¡±â*/

append using "D:\KReIS\STATA\h02.dta"

append using "D:\KReIS\STATA\h03.dta"

order hid w01hid w02hid w03hid d001 d002 dummy

save "D:\KReIS\STATA\hw1.dta", replace

¸ñ·Ï
´ÙÀ½±Û
°³ÀÎÀڷḦ Á¾À¸·Î ¿¬µµº° ÇÕÄ¡´Â ¹æ¹ý (7Â÷ ±âÁØ, 13ÆгÎ)
ÀÌÀü±Û
°³ÀÎ¿ë µ¥ÀÌÅ͸¦ ȾÀ¸·Î ¿¬µµ°£ ¸ÓÁöÇÏ´Â ¹æ¹ý (7Â÷ ±âÁØ)