Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Management 連賢明 政大財政. 2 統計軟體  一般通用 STATA SAS  個體計量 LIMDEP  高階軟體 MATLAB GAUSS.

Similar presentations


Presentation on theme: "Data Management 連賢明 政大財政. 2 統計軟體  一般通用 STATA SAS  個體計量 LIMDEP  高階軟體 MATLAB GAUSS."— Presentation transcript:

1 Data Management 連賢明 政大財政

2 2 統計軟體  一般通用 STATA SAS  個體計量 LIMDEP  高階軟體 MATLAB GAUSS

3 3 STATA 優點  容易上手  執行速度快  軟體可永久性使用  網站建構相當完整 http://www.stata.com/ http://www.ats.ucla.edu/stat/stata//  電腦記憶體要多

4 Stat/Transfer  將其他檔案格式轉為 STATA 資料檔  Stat/Transfer 可支援的檔案類型 Excel Limdep SAS SPSS Many others

5 Stat/Transfer  Input File Type : 選取原始資料的檔案類型  File Specification :輸入原始資料檔的路徑  Output File Type :選取欲轉換之檔案類型  File Specification :輸入轉換後資料檔欲儲存之路徑

6 Stat/Transfer  Variables 標籤下勾選需要的變數

7 STATA 介面  The command window :撰寫程式  The result window :執行程式後之結果  The review window :顯示執行過的程式  The variable window :列出所有變數

8 1.1 Read the data  Read the ASCII file infile must provide the variable name, width, and format  Read the excel file insheet variable names need to be specified  Read the Stata file use c:\regstata\elemapi from the internet

9  cd  dir  use  save

10

11

12

13

14 1.2 Describe the data  Describe the data Data size Observations Variable name Variable type (string, byte, float, etc)

15

16 直接按 ok

17

18  Variables api00/academic performance of the school acs_k3/the average class size in kindergarten through 3rd grade meals/the percentage of students receiving free meals full/the percentage of teachers who have full teaching credentials

19  List All observations Some observations Some variables

20

21

22

23

24 選取變數

25

26

27  Notice the missing values of meals.

28  Codebook Number of values Missing values Distribution of values

29

30 選取變數後按 ok

31

32  summarize Provide concise information about variables Observations Basic statistics (mean, s.d., min, max) Option: details

33

34 選取變數後按 ok

35

36

37

38

39 1.3 Tab the data  Tabulate Tabulate the size of class size

40

41

42

43  Look at the school and district number to check if they are from the same district

44

45

46

47

48

49

50

51

52 1.4 Graph the data  Use graphs to examine the data Histogram Stem and leaf plot

53

54

55

56

57

58

59

60  A stem-and-leaf plot would also have helped to identify these observations.  This plot shows the exact values of the observations, indicating that there were three -21s, two -20s, and one -19.

61  Quiz 1: do a histogram on full

62

63

64  Let's look at the frequency distribution of full to see if we can understand this better.  The values go from 0.42 to 1.0, then jump to 37 and go up from there. It appears as though some of the percentages are actually entered as proportions, e.g., 0.42 was entered instead of 42 or 0.96 which really should have been 96.

65

66

67

68 Again, let's see which districts these data came from.

69

70

71

72  We note that all 104 observations in which full was less than or equal to one came from district 401.  Let's count how many observations there are in district 104 using the count command.

73

74

75

76 Two ways graphs  Scatterplot: show the joint distribution of two variables  Let's look at the scatterplot matrix for the variables:

77

78

79

80

81 Correct the variable mistakes  acs_k3 Replace the negative values into the positive ones replace acs_k3=-acs_k3 if acs_k3<0  Full Change from the percentage to the proportion replace full=full*100 if full<=1

82

83

84

85

86

87

88  save elemapi2, replace


Download ppt "Data Management 連賢明 政大財政. 2 統計軟體  一般通用 STATA SAS  個體計量 LIMDEP  高階軟體 MATLAB GAUSS."

Similar presentations


Ads by Google