<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/fun-sci/">
    <title>fun-sci @ ウィキ</title>
    <link>http://w.atwiki.jp/fun-sci/</link>
    <atom:link href="https://w.atwiki.jp/fun-sci/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>fun-sci @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2007-05-27T21:15:44+09:00</dc:date>
    <utime>1180268144</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/22.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/23.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/10.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/fun-sci/pages/21.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/26.html">
    <title>SASってさ</title>
    <link>https://w.atwiki.jp/fun-sci/pages/26.html</link>
    <description>
      SASを使うユーザーがどれくらいいるのか
実際のところどうなのか聞いて見たい人は多いのではないだろうか？

自分は、SASにはいろいろな疑問を持っている。
どっちかというと、クライアントで作業をすることの多い自分なので
サーバーベースで大規模システムにあわせているであろうSASに
どうしても窮屈を感じてしまうのです。


・今更、なんでラインベースのデータ更新なの？
と、思ってしまうのですよ。ファイル読み込みとか、大規模計算ならとにかく
何でもかんでもラインベースの仕組みで処理させるのはいただけない。
arrayなんか作っても、所詮作りこまれた配列システムにはかないません。

・なんでサブルーチンを作らせないの？
とにかく、データステップに関数を作らせてくださいという感じです。
今更、マクロとかLINKとかの制御ジャンプ構文だけ（しかもネスト制限あり）
というのはどうかと。

・IOMの仕様
サポートページがわかりづらいうえに、SAS IOMに渡すSASコードが純粋なコードでないと
動かない（らしい）というのはいただけない。ファイルでコードを開いて
直接投げ込むようなコードを書きたいときは、いろいろ前処理が必要で
リファクタリングしにくいと思う。    </description>
    <dc:date>2007-05-27T21:15:44+09:00</dc:date>
    <utime>1180268144</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/12.html">
    <title>ぼやきのへや</title>
    <link>https://w.atwiki.jp/fun-sci/pages/12.html</link>
    <description>
      ほそぼそとやりたいが
ここだけがふくらむかも
でも、たぶん更新もやたらあるかと。

-[[SASがらみ&gt;http://www21.atwiki.jp/fun-sci/pages/26.html]]    </description>
    <dc:date>2007-05-27T21:12:10+09:00</dc:date>
    <utime>1180267930</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/fun-sci/pages/2.html</link>
    <description>
      メニュー
-[[トップページ]]
--[[Python関連]]
--[[R関連]]
--[[統計関連]]
--[[ぼやきーず&gt;http://www21.atwiki.jp/fun-sci/?page=%E3%81%BC%E3%82%84%E3%81%8D%E3%81%AE%E3%81%B8%E3%82%84]]

//---[[SQLObject&gt;http://www21.atwiki.jp/fun-sci/pages/5.html]]

----
-[[注目のかたがた&gt;http://www21.atwiki.jp/fun-sci/pages/10.html]]

-[[メニュー2]]


//----
//-[[メニュー]]
//----


----

-[[@ウィキ ガイド&gt;http://atwiki.jp/guide/]]
-[[@wiki 便利ツール &gt;http://atwiki.jp/tools/]]
-[[@wiki&gt;http://atwiki.jp]]

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります    </description>
    <dc:date>2007-05-27T20:51:33+09:00</dc:date>
    <utime>1180266693</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/fun-sci/pages/1.html</link>
    <description>
      ＊＊楽しいかがく　wiki版


結局、書く内容が多くなるとwikiが必要になりそうなので作成します。

基本的に、なんでもアリのまとめサイトにするつもりですが
たぶん、特定の技術ネタ、科学ネタ、音楽ネタが中心になると思われます。
散漫な感じは、ご容赦おば


＊＊こんてんつ

-[[python関連&gt;http://www21.atwiki.jp/fun-sci/?page=python%E9%96%A2%E9%80%A3]]
私が現在、メインで使おうとしている言語。
今まで使った言語で一番わかりやすく洗練されていると思います。

-[[R関連&gt;http://www21.atwiki.jp/fun-sci/pages/22.html]]
統計解析パッケージRについてのあれこれ

-[[統計関連&gt;http://www21.atwiki.jp/fun-sci/pages/15.html]]
統計解析のあれこれを書いておこうかと。
ぺーぺーなので、おかしいところがたくさんでそう。
さらに、このwikiで書式が対応できるか不安。


-[[ぼやいて、ぼやいて、ぼやかれて、ぼやいて&gt;http://www21.atwiki.jp/fun-sci/?page=%E3%81%BC%E3%82%84%E3%81%8D%E3%81%AE%E3%81%B8%E3%82%84]]
そんなわたしのぼやきが。



----
-[[注目のかたがた&gt;http://www21.atwiki.jp/fun-sci/pages/10.html]]
自分の興味分野の方々のサイトへ飛びます。    </description>
    <dc:date>2007-05-27T20:50:32+09:00</dc:date>
    <utime>1180266632</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/22.html">
    <title>R関連</title>
    <link>https://w.atwiki.jp/fun-sci/pages/22.html</link>
    <description>
      ＊＊R関連（といいつつrpyばっか）

-[[rpyとgnuplot覚え書き&gt;http://www21.atwiki.jp/fun-sci/pages/21.html]]

-[[rpy glm覚え書き&gt;http://www21.atwiki.jp/fun-sci/pages/23.html]]

-[[「S-Plusによる統計解析」のデータをPythonへ&gt;http://www21.atwiki.jp/fun-sci/pages/24.html]]

-[[Rのオブジェクトでsummaryできない！&gt;http://www21.atwiki.jp/fun-sci/pages/25.html]]    </description>
    <dc:date>2007-05-27T20:48:47+09:00</dc:date>
    <utime>1180266527</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/25.html">
    <title>Rのオブジェクトでsummaryできない！</title>
    <link>https://w.atwiki.jp/fun-sci/pages/25.html</link>
    <description>
      そうそう、RobjをPython側でリスト、辞書で受け取ると
Rpyがうまく変換してくれないと、正しく実行してくれない。

特に、R特有のクラスである場合は困ってしまう。悩みます。

たとえば、
http://www21.atwiki.jp/fun-sci/pages/23.html
で出力される&quot;ret&quot;データは
r.summary(ret)としても、数値入り辞書と解釈されて

 [[&#039;  3&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039; 11&#039;, &#039;-none-&#039;, &#039;list&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;num
 eric&#039;], [&#039;100&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;  3&#039;, &#039;-none-&#039;, &#039;call&#039;], [&#039;100&#039;, &#039;-none-
 &#039;, &#039;numeric&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;logical&#039;], [&#039;  3&#039;, &#039;formula&#039;, &#039;call&#039;], [&#039;  1&#039;,
  &#039;-none-&#039;, &#039;logical&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;character&#039;], [&#039;  3&#039;, &#039;terms&#039;, &#039;call&#039;],
  [&#039;  0&#039;, &#039;-none-&#039;, &#039;NULL&#039;], [&#039;  3&#039;, &#039;-none-&#039;, &#039;list&#039;], [&#039;  4&#039;, &#039;-none-&#039;, &#039;numeri
 c&#039;], [&#039;  0&#039;, &#039;-none-&#039;, &#039;NULL&#039;], [&#039;  0&#039;, &#039;-none-&#039;, &#039;NULL&#039;], [&#039;  4&#039;, &#039;-none-&#039;, &#039;li
 st&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;100&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;  1&#039;, &#039;-none
 -&#039;, &#039;numeric&#039;], [&#039;  5&#039;, &#039;-none-&#039;, &#039;list&#039;], [&#039;  3&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;  1&#039;,
  &#039;-none-&#039;, &#039;numeric&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;numeric&#039;
 ], [&#039;100&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;100&#039;, &#039;-none-&#039;, &#039;numeric&#039;], [&#039;100&#039;, &#039;-none-&#039;,
  &#039;numeric&#039;], [&#039;  3&#039;, &#039;-none-&#039;, &#039;list&#039;], [&#039;  1&#039;, &#039;-none-&#039;, &#039;numeric&#039;]]

こんなのが返ってきてしまう。
そんなときは、こうしてください。

 #一時的に生のRobjを受け取るようにする
 
 set_default_mode(NO_CONVERSION)
 
 ret = r.glm(r(&quot;y~x1+x2&quot;),data=r.data_frame(x1=x1,x2=x2,y=y,family=&#039;gaussian&#039;))
 
 # デフォルトのrpyデータ変換に戻す
 set_default_mode(BASIC_CONVERSION)
 
 # pythonで読めるデータに変換
 # このときBASIC_CONVERSIONに戻していないと返り値もRobjになってしまう。
 ret_py = ret.as_py()
 
 # summaryする。係数、Interceptの検定なども出てくる。
 smry = r.summary(ret)

ま、マニュアルしっかり見れば実は書いてあることもあるわけですが、
正直、自分も「もっと直感的に使えるようにしてくれ。Pythonなんだし。」
とか、おもうてしまいます。

いじょ。    </description>
    <dc:date>2007-05-27T20:45:35+09:00</dc:date>
    <utime>1180266335</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/23.html">
    <title>rpy glm覚え書き</title>
    <link>https://w.atwiki.jp/fun-sci/pages/23.html</link>
    <description>
      テストデータでscipy、rpyのglmの使い方を勉強してみる。

出展はハーバード大学講義テキスト
生物統計学入門のChapter 19
データは公開されているものなのでOKかと

コードはこんな感じ

 from scipy import *
 from rpy import *
 import csv
 
 # low_infants.txtは下の「データ」のテキストファイル
 rd1 = csv.reader(file(&quot;low_infants.txt&quot;)) 
 
 low_inf = []
 
 for line in rd1:
   low_inf.append(line)
 
 # この時点では文字列のarray
 low_infa = array(low_inf)
 
 # 文字列を64精度の数値に変換
 low_infa = low_infa.astype(float64)
 
 x1=low_infa[:,4].tolist()
 x2=low_infa[:,2].tolist()
 y=low_inf[:,1].tolist()
 
 ret = r.glm(r(&quot;y~x1+x2&quot;),data=r.data_frame(x1=x1,x2=x2,y=y,family=&#039;gaussian&#039;))
 
 ret[&#039;coefficients&#039;]

係数は本に載っていたように出てきた。
一応、うまく行ってる？



＊＊　データ
 27,41,29,1360,37,0
 29,40,31,1490,34,0
 30,38,33,1490,32,0
 28,38,31,1180,37,0
 29,38,30,1200,29,1
 23,32,25,680,19,0
 22,33,27,620,20,1
 26,38,29,1060,25,0
 27,30,28,1320,27,0
 25,34,29,830,32,1
 23,32,26,880,26,0
 26,39,30,1130,29,0
 27,38,29,1140,24,0
 27,39,29,1350,26,0
 26,37,29,950,25,0
 27,39,29,1220,25,0
 26,38,29,980,28,0
 29,42,33,1480,30,0
 28,39,33,1250,31,1
 27,38,29,1250,37,0
 25,36,28,920,31,0
 25,38,30,1020,21,0
 24,34,27,750,21,0
 31,42,33,1480,30,0
 28,37,32,1140,23,0
 23,32,28,670,33,1
 26,36,29,1150,18,0
 25,34,28,1030,20,0
 23,33,29,560,29,0
 28,37,30,1260,26,0
 35,36,31,900,23,0
 24,31,30,620,33,0
 33,39,31,1440,26,0
 28,39,29,1350,38,0
 26,37,27,1170,23,0
 26,36,27,1170,23,0
 26,37,27,1170,26,0
 28,40,32,1420,27,0
 29,43,31,1475,27,0
 28,37,28,1200,19,0
 27,36,30,970,30,1
 27,38,29,1190,27,0
 28,39,28,1350,31,0
 28,41,31,1460,29,0
 22,32,27,570,23,1
 22,32,25,620,35,0
 28,40,30,1200,27,0
 24,32,28,660,35,0
 28,40,28,1280,28,0
 23,33,25,830,21,0
 22,31,23,680,26,0
 23,32,27,640,21,0
 28,39,28,1440,29,0
 25,38,27,1150,32,0
 27,35,27,850,32,0
 24,29,26,760,24,0
 23,20,25,620,19,0
 21,32,23,660,41,0
 25,35,26,985,33,0
 22,33,24,690,17,0
 27,38,29,1200,26,1
 28,40,29,1370,20,0
 26,35,27,1170,25,0
 28,38,30,1200,30,0
 27,39,30,1100,32,0
 31,43,32,1480,33,0
 30,38,33,1350,34,1
 26,38,27,1160,23,0
 27,38,31,1330,30,0
 24,36,26,960,22,0
 25,39,27,1080,35,0
 25,36,27,1000,26,0
 29,41,35,1490,34,1
 25,35,28,880,18,1
 29,41,30,1370,23,0
 31,40,31,1325,18,1
 29,39,30,1400,20,0
 26,37,27,1240,29,0
 23,31,25,660,18,0
 23,34,25,780,25,0
 25,37,26,950,14,0
 25,36,29,850,39,0
 28,40,29,1200,32,0
 30,42,34,1440,35,1
 26,38,30,1100,23,1
 26,38,29,1250,18,0
 29,42,33,1420,28,1
 28,38,30,1400,19,0
 27,36,29,1420,36,0
 24,34,24,900,29,0
 29,38,33,1160,33,1
 23,34,25,820,39,0
 28,41,32,1410,29,1
 27,39,31,1300,33,1
 26,38,31,1110,30,0
 26,37,31,820,30,1
 27,40,29,1150,28,0
 28,35,32,880,35,1
 28,41,33,1320,36,1
 26,38,28,1080,36,0    </description>
    <dc:date>2007-05-24T23:48:20+09:00</dc:date>
    <utime>1180018100</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/24.html">
    <title>S-Plusによる統計解析のデータをPythonへ</title>
    <link>https://w.atwiki.jp/fun-sci/pages/24.html</link>
    <description>
      ＊S-Plusによる統計解析のデータをPythonへ

RはS-Plusのクローンなので
「S-Plusによる統計解析」を参考にしている人が多いのでは？
この本に書いてあるデータはlibraryとして提供されているので
勉強するのに使いやすい。
せっかくなので、Pythonでも利用してみたいなんてときは
こんな感じでデータの抽出、ファイルへの書き出しができます。

 from rpy import *
 
 r(&quot;library(MASS)&quot;)
 dat = []
 # データをリスト中に取り込む
 dat = r(&quot;Aids2&quot;)
 
 # ファイルへの書き込み
 myf = open(&quot;Aids2.txt&quot;,&quot;w&quot;)
 myf.write(str(dat))
 myf.close()    </description>
    <dc:date>2007-05-24T00:16:48+09:00</dc:date>
    <utime>1179933408</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/10.html">
    <title>注目のかたがた</title>
    <link>https://w.atwiki.jp/fun-sci/pages/10.html</link>
    <description>
      リンク先に飛ぶと世界の広さを感じます。
すごい人はすごいのね。

----
＊技術系
-[[enthought&gt;http://www.enthought.com/]]
sci-py、num-pyの開発を行う傍ら、pythonのインストールがめんどっちぃパッケージをまとめてしまう人々。かゆいところに手がとどいた感触です。

-[[R Project&gt;http://www.r-project.org/index.html]]
あらゆる高価な統計解析パッケージがある中、このボリュームで「タダ」。GUIの方もデータの表示以外は問題ないかと。後は信頼性の問題だけなのでは？

----
＊Python Library

Pythonのプログラムは要点を理解すれば楽に組めるところがステキ。

-[[turbo gears&gt;http://www.turbogears.org/]]
統合ウェブ開発環境。Ajaxライブラリもついてる。簡単にWikiが作れちゃうデモが公開されている。自分は特にWebページを作らんのですが、感動しちゃいました。

-[[twisted&gt;http://twistedmatrix.com/trac/wiki]]
名前がステキなnetwork framework。らしい。ネットワークフレームワークっていままであったっけ？一通りプロトコルが読めちゃうのはよいかもね。


----
＊科学一般
-[[Wired &gt;http://www.wired.com/]]　→　未更新です！↓のWired　Visionへ
大人になると夢がなくなるなんてことはない！このサイトで科学技術の進歩をみてみよー！脳直結のコントロールデバイス、パワードスーツ、重力エレベータなどの話題がわんさかでございます。
自分はこれをよんでタマに幸せになれます。


-[[Wired VISION&gt;http://wiredvision.jp/news/]]　→　復活    </description>
    <dc:date>2007-05-21T22:33:41+09:00</dc:date>
    <utime>1179754421</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/fun-sci/pages/21.html">
    <title>rpyとgnuplot覚え書き</title>
    <link>https://w.atwiki.jp/fun-sci/pages/21.html</link>
    <description>
      Rpyを使ってRに線形回帰（単なる直線回帰ですが）を
させる方法を説明しているページ

http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/python/lin_reg/

のplot部分をGnuplot.pyを使ってGnuplotで書いてみる。

 from rpy import r
 
 import Gnuplot
 
 my_x = [5.05, 6.75, 3.21, 2.66]
 my_y = [1.65, 26.5, -5.93, 7.96]
 ls_fit = r.lsfit(my_x,my_y)
 gradient = ls_fit[&#039;coefficients&#039;][&#039;X&#039;]
 yintercept= ls_fit[&#039;coefficients&#039;][&#039;Intercept&#039;]
 
 #ここから
 
 g1 = Gnuplot.Gnuplot()
 g1.plot(zip(mx_x,my_y))
 
 # sに直線の式のTemplateを作成
 s = Template(&#039;$grad * x + ($itspt)&#039;)
 form1 = s.substitute(grad=gradiant,itspt=yintercept)
 &#039;5.3935773612 * x + (-16.2811279931)&#039;
 
 g1.plot(form1)    </description>
    <dc:date>2007-05-21T22:26:17+09:00</dc:date>
    <utime>1179753977</utime>
  </item>
  </rdf:RDF>
