Re: [問題] SAS的問題

看板Statistics作者 (咖啡王子)時間17年前 (2008/05/17 22:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
※ 引述《dolby (dolby)》之銘言: : 請問大大, : 我有一個資料檔,包含了幾家公司的一段期間報酬(例如五年) : 如果我只要其中的某短期間(其中的三年) : 我要如何下指令呢? year 是你的年變項 1991~1995 我假設1992 1993 1994是你的其中三年要求的資料 寫法可以這麼做 data a; set yourfile; if 1992<=year<=1994 then output; run; 也可以這麼寫 data a; set yourfile; if year=1991 then delete; if year=1995 then delete; run; 最後一個寫法 data a; set yourfile; if year=1992 then output; if year=1993 then output; if year=1994 then output; run; 根據使用情況 可以利用刪除法 (delete) 和輸出法 (output) 請加油 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 134.208.32.109
文章代碼(AID): #18Bkogo9 (Statistics)
討論串 (同標題文章)
本文引述了以下文章的的內容:
問題
2
4
完整討論串 (本文為第 2 之 3 篇):
問題
2
4
文章代碼(AID): #18Bkogo9 (Statistics)