Statistics 板


LINE

第一次發文 若無意觸犯規則請海涵 爬了以SAS為搜尋的文章 有找到類似於我的問題但是卻不大一樣的結果 無奈之下才PO文發問 ================================== 我從EXCEL讀入的資料類似下面 1 . . 40.790 -0.75 -0.25 . . . 2 . . -45.143 0.07 0.11 . . . 3 . . -73.430 1.03 1.69 . . . 4 . . -52.929 0.14 0.13 . . . 5 . . -52.213 -0.13 -0.03 . . . 16 . . 72.148 -0.49 -0.41 . . . 17 . . 11.985 -1.95 -1.53 . . . 18 . . 48.482 -1.15 -0.75 0.29 . . 19 . . 85.017 -0.30 0.10 -5.98 . . 34 . -37.143 -16.406 -0.50 -0.41 -1.65 . . 35 . -51.948 -21.528 -2.94 -3.05 0.89 . . 36 . -47.269 -20.670 -0.50 -0.80 0.49 . . 37 -40.524 -40.617 -24.098 -0.93 -0.72 -0.98 . . 38 -17.575 6.44 12.168 1.44 1.57 -2.84 . . 39 -33.706 2.355 11.192 1.21 1.13 -0.89 . . 40 -11.308 20.825 31.634 -0.28 0.07 0.71 0.37 . 41 0.489 28.015 43.969 -0.35 -1.37 1.24 0.79 . ================================ 有文章好像有提到"."是missing value的概念 不過當我寫 PROC IMPORT OUT= WORK.ttb DATAFILE= "D:\sas\TBB201003.xls" DBMS=EXCEL REPLACE; RANGE="Sheet1$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; proc print ; run ; proc plot ; plot y1*x1 ; plot y2*x1 ; plot y3*x1 ; plot y4*x1 ; run ; proc plot ; plot y1*x2 ; plot y2*x2 ; plot y3*x2 ; plot y4*x2 ; run ; proc plot ; plot y1*x3 ; plot y2*x3 ; plot y3*x3 ; plot y4*x3 ; run ; proc plot ; plot y1*x4 ; plot y2*x4 ; plot y3*x4 ; plot y4*x4 ; run ; proc means ; var x1 x2 x3 x4 y1 y2 y3 y4 ; run ; proc corr ; var x1 x2 x3 x4 y1 y2 y3 y4 ; run ; 有點的部分 就會跑出 16 proc means ; var x1 x2 x3 x4 y1 y2 y3 y4 ; run ; ERROR: Variable x4 in list does not match type prescribed for this list. ERROR: Variable y1 in list does not match type prescribed for this list. ERROR: Variable y2 in list does not match type prescribed for this list. ERROR: Variable y3 in list does not match type prescribed for this list. ERROR: Variable y4 in list does not match type prescribed for this list. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE MEANS used (Total process time): real time 0.02 seconds cpu time 0.00 seconds 17 proc corr ; var x1 x2 x3 x4 y1 y2 y3 y4 ; run ; ERROR: Variable x4 in list does not match type prescribed for this list. ERROR: Variable y1 in list does not match type prescribed for this list. ERROR: Variable y2 in list does not match type prescribed for this list. ERROR: Variable y3 in list does not match type prescribed for this list. ERROR: Variable y4 in list does not match type prescribed for this list. 造成無法運算的結果 我把語法改成 proc means ; run ; proc corr ; run ; 跑出來結果亦同 可以請問該如何寫才能將 "."的資料跳過進行運算嗎 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.172.235.212
1F:→ kingbee:import 需要再打個mixed=yes 03/15 09:12
2F:→ kingbee:excel的missing 和SAS的表示方法正好相反 03/15 09:12
3F:→ kingbee:所以先把變項都轉換成文字型態 進入SAS 再轉成數字 03/15 09:13







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:BabyMother站內搜尋

TOP