看板 Statistics 關於我們 聯絡資訊
請問大大我想知道下列數是否隨機 data three; input y @@; cards; 1 4 4 2 1 3 2 1 3 3 2 4 2 3 3 4 2 1 1 2 3 4 1 2 3 2 1 3 2 3 4 2 1 4 ; proc print; data three; set three; IF y >1 then n1=1; <-請問各位大大這行這麼改, 如果要改成當二個數字 一樣 n1=1。 請問怎麼改? ELSE n1=0; n2=1-n1; r1= abs(lag(n1)-n1); proc means; var n1 n2 r1; output out=run sum=n1 n2 r1; -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.243.23.203 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1493137573.A.820.html