匯入數據sysuse auto, clear 確認資料型態 #整筆資料型態
describe #資料型態簡介 describe, short #單筆資料 describe var #number of rows(observations) count ex1: count if price >5000 #how many obs > 5000 ex2: count if missing(var) #how many missing values in var #辨別某一variable是否可以辨別所有observation #第一次使用先install ssc install unique #用一個變數來辨別observations ex1: unique var1 #用兩個變數來辨別observations ex2: unique var1 var2 #check statistics 語法形式: codebook[var][if][in][, options] #not necessary ex1: codebook price if price > 5000 ex2: codebook price in 10/20 #range為10至20筆obsevations ex3: codebook price in f/10 #first to 10th obsevations ex4: codebook price in 20/l #20th to last obsevations #examine more statistics 語法形式: summarize[var][if][in][weight][, options] #記得加 "," summarize var, detail =sum var, detail
0 Comments
|