潜在変数へ向けて1(とりあえずインストールまで)
「独立連鎖モデル」というのを作るのに、「グラフィカルモデリング」というのをやってみたい。
MIMというソフトがあって、それが使えるかどうかわからないけど、どうやらmimRというパッケージをつかえばR越しにMIMを使用できるとのことで(ただしWinのみ)、まあものは試しにインストールまではやってみようと思う。
●
まず、mimRをインストール。これは普通に会津や筑波のサーバからダウンロードできる。で、これをダウンロード中に「dependency ''RDCOMClient'' is not available」と出る。実際、mimRをロードしようとしてもエラーが出る:
> library(mimR) 要求されたパッケージ RDCOMClient をロード中です エラー:パッケージ 'RDCOMClient' をロードできませんでした 追加情報: Warning message: 'RDCOMClient' という名前のパッケージはありません in: library(pkg, character.only = TRUE, logical = TRUE, lib.loc = lib.loc)
そこでRDCOMClientをインストールする。これはhttp://www.omegahat.org/からダウンロード可能。Win版ならGUIメニューから「パッケージ」→「ダウンロードサイトの選択」→「Omegahat」を選択、同様に「パッケージのインストール」でインストール可能。
RDCOMClientをインストールした後にmimRをロードすると、ちゃんと読み込める:
> library(mimR) 要求されたパッケージ RDCOMClient をロード中です ------------------------------------------------------------- mimR: A package for graphical modelling in R mimR, version 1.2.7 is now loaded Copyright (C) 2002, S?en H?sgaard Maintained by S?en H?sgaard <sorenh@agrsci.dk> Webpage: http://genetics.agrsci.dk/~sorenh/mimR Built: R 2.2.0; ; 2005-10-14 14:38:16; windows NOTICE: o mimR is available on Windows platforms only o The current version of mimR requires that - R version 2.1.1 or later is used - MIM version 3.2 or later is installed on the computer MIM can be downloaded from http://www.hypergraph.dk. - the R package RDCOMClient package is installed. o mimR will automatically start the MIM program if not already running. However, mimR sometimes runs more smoothly if the user starts MIM manually. For more information type ?mimR ------------------------------------------------------------- 次のパッケージを付け加えます: 'mimR' The following object(s) are masked from package:stats : simulate > setRepositories()
以下はmimRのヘルプ:
mimR package:mimR R Documentation The package 'mimR': summary information Description: This package provides an interface to the MIM program for inference in mixed graphical models. Details: * mimR is available on Windows platforms only. * mimR requires that the MIM program is installed on the computer. * MIM can be downloaded from http://www.hypergraph.dk. * mimR requires that the R package 'RDCOMClient' is installed. * For information about required versions of R and MIM, please see the information presented when mimR is loaded. * mimR will automatically start the MIM program if not already running. However, mimR sometimes runs more smoothly if the user starts MIM manually. * The mimR package comes with a small users manual. * To start using mimR you must do library(mimR) The package is intended as a contribution to the gR-project derscribed by Lauritzen (2002). Authors: S?en H?sgaard, Biometry Research Unit, Danish Institute of Agricultural Sciences, DK-8830 Tjele, Denmark Acknowledgements: Thanks to David Edwards, the creator of the MIM program. References: Lauritzen, S. L. (2002). gRaphical Models in R. _R News_, 3(2)39.
作者の名前が文字化けしてますが、その部分はOにスラッシュの、セーレン・キルケゴールの名前に出てくる例のあれ。デンマーク人だなあ。ていうか文字化けすんなよ。
mimRパッケージのdocフォルダにHojsgaard氏(oにスラッシュね)の論文とマニュアルがあるので、眺めておく。