반응형

랜덤 샘플링 (Excel RAND Function)

목적 
Get a random number between 0 and 1 (0과 1 사이에서 랜덤 넘버를 구하는 것이 목적!)
함수 
=RAND () 

리서치할 때 많은 데이타 중에서 랜덤으로 샘플링을 해야 할 때가 있습니다. 그럴 때 랜덤 함수를 사용하면 자동은 0에서 1 사이에서 숫자를 생성합니다. 생성된 숫자는 예를 들어 이런 식으로 나타납니다. -> 0.422245717

문제는 랜덤 함수를 이용할 때마다 각 셀에 대한 랜덤 숫자가 바뀌어서 생성이 된다는 것인데요, 그것을 방지하기 위해서 랜덤 함수를 사용해서 랜덤 넘버를 생성한 후 셀을 복사해서 Paste Special > Values to convert to text 기능을 사용합니다. 

0과 1 사이의 넘버 외에 숫자를 지정해주고 싶다면 다음의 공식을 사용합니다 : RAND() * (b - a) + a







반응형
반응형

엑셀(excel)에서 셀 안에 텍스트의 길이가 셀보다 길 경우 텍스트 전체가 안보이거나 옆 셀로 텍스트가 넘어가는 경우가 있습니다. 


위 그림은 제가 리서치 중인 데이타인데 D 열은 줄바꿈 설정을 하지 않은 것이고 E 열은 설정을 해서 글씨가 잘 보이네요. 



E열의 경우에 텍스트 줄바꿈 기능을 이용해서 한 셀에서 여러 줄로 텍스트가 모두 보이도록 해 보겠습니다. 아래 그림과 같이 홈 메뉴에서 'Wrap Text'라는 메뉴가 보입니다. 한글 메뉴로는 '텍스트 줄바꿈'이라고 뜹니다. 아래 셀과 같은 경우는 D 열 전체가 설정이 필요하므로 D 열 전체를 선택한 다음 'Wrap Text' 버튼을 눌러 설정을 해줍니다. 

말씀드린 대로 일단 D 열 전체설정을 해주고, Wrap Text (텍스트 줄바꿈) 을 꾹 눌러 주세요!



자, 아래 그림을 보시면 셀 안 텍스트가 두 줄로 바뀐 거 보이시죠? 

문장이 길 경우 E 열처럼 텍스트가 여러 줄로 나타납니다. 

참 쉬운 기능인데 가끔 기억이 안나서 헤맬 때가 있어요.^^

이상! 간단한 엑셀 줄바꾸기 팁이었습니다. 

유용한 정보라 생각되시면 공감 버튼 꾹 눌러주세요!




반응형
반응형

SPSS 통계 프로그램 24 버젼 무작정 따라하기!

 

Lab 1: Entering and Importing Data 데이타 입력하기

Problem Set 1. Follow the steps below to enter the data displayed.

1. Open SPSS 24 and start a new (blank) dataset. SPSS 24 를 실행해서 새로운 데이타셋을 열기

2. Click on Variable View at the bottom of the window. 창 아래 'Variable View' 클릭하기

3. Enter the specifications of all variables seen in the picture그림에 있는 모든 변수 입력하기

4. Click on Data View at the bottom of the window. Now in the data view you should see the columns labeled with the variable names you just created. Enter the values of each variable as seen on the picture. 'Data View' 클릭하고, 그림에 보이는 각각의 데이터 입력하기

5. If needed, go back to the Variable View and modify the specification of the variables. Pay attention to the number of decimal places (Decimals), value labels (Values), and the type of variable (Measure). 필요하면 'Variable View'로 다시 가서 Decimals, Values, and Measure 등의 값들을 지정해 주기

6. Save the created SPSS dataset by clicking File à Save. Specify the location and dataset name. Note .sav is the file extension for SPSS dataset files. 만든 SPSS 데이터셋 파일을 특정한 폴더를 지정해 저장하기

Problem Set 2. CSV 확장자 파일을 엑셀에서 봤을 때와 비교해 보기.

1. Open the short_nels.csv file with Excel and browse the data layout. 엑셀 파일 열기(파일은 아래 있습니다.)

2. Open SPSS and start a new (blank) dataset. SPSS 실행하기

3. Click the following in the drop-down menu: File à Import Data à CSV Data. Locate the .csv file that you just downloaded and click Open. CSV 데이타 불러오기

4. SPSS will scan through the .csv file and determine the appropriate specifications at its best knowledge. You should carefully examine the specifications automatically populated by SPSS and make sure they are correct. (Advanced settings are available in Advanced Options (Text Wizard). Click OK. SPSS 프로그램이 .csv 파일을 둘러보고 파일에 임포트할 때 맞게 임포트되었는지 신중하게 봐야합니다. 고급 세팅에서 더 세심하게 옵션을 지정할 수 있습니다. 그렇지 않으면 일반적으로 그냥 OK 클릭. 

5. Browse the created SPSS dataset. Compare with the .csv file opened in Excel. Make sure the import is correct. 엑셀 파일과 SPSS 파일을 비교해 보고 맞게 임포트되었는지 확인합니다. 

6. Click on Variable View at the bottom of the window. Change the Measure Column of the first three variables (stu_id, sch_id, sstratid) to Nominal.  'Variable View'로 가서 처음 세 변수들을 Nominal로 바꿉니다. 

7. Save the created SPSS dataset. 데이타셋 저장.

short_nels.csv


반응형

+ Recent posts