日本語版Lin4Neuroをアップデートしました。ここから最新版をダウンロードできます。
Lin4Neuro is updated. 3D Slicer was updated to the latest 4.1. I also included JGR (Java GUI for R) in the release. You can find the release here.
The other day I wanted to install R on Ubuntu. Googling led me to this site, but I found some of them are not up-to-date. In addition, I don’t use Sun-Java but open-JDK. So I needed to change things a little bit.
Below is what I did. Note that I already installed openJDK.
- Add an R repository to /etc/apt/sources.list
- Obtain the public key of Ubuntu repository
- Update the respository
- Install r-base
- Upgrade the repository
- Set java configuration
- Start R environment
- Install JGR inside R environment
First, you need to decide a CRAN mirror close to where you live. The list can be found here. Since I live in Tsukuba Japan, I added the following line to /etc/apt/sources.list
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu lucid/
Below is the format.
deb http://my.favorite.cran.mirror/bin/linux/ubuntu lucid/
The Ubuntu archives on CRAN are signed with the key of “Michael Rutter
” with key ID E084DAB9. You can fetch this key then feed it to apt-key with the following lines.
$ gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
$ gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get install r-base r-base-dev
By upgrading the repository, r-cran-* will be installed.
$ sudo apt-get upgrade
The following should be displayed.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
r-base-html r-cran-boot r-cran-class r-cran-cluster r-cran-codetools
r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix
r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial
r-cran-survival r-doc-html
17 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.2MB of archives.
After this operation, 827kB disk space will be freed.
Do you want to continue [Y/n]?
sudo R CMD javareconf
sudo R
install.packages('JGR')
A GUI will popup asking you to select a mirror to download from. Select the same mirror as before, though it doesn’t matter.
After installation is completed. Add the library and install the ggplot2 library.
library(JGR)
install.packages('ggplot2', dep = TRUE)
This will take some time.
After that, you can start JGR by typing
JGR()
This will bring up JGR.

But this is not the end. Please look at the shell carefully, which says,
Starting JGR run script. This can be done from the shell as well, just run
/usr/local/lib/R/site-library/JGR/scripts/run
That means that you don’t have to run R first before running JGR.
Now I will make a launcher of JGR.
Right-click of GNOME menu –> “Edit Menu”
That will pop up Main Menu Dialogue.

In this case, I want to put the JGR launcher under Science, so click “New Item”

Then you will see JRG in the menu. Note that I got the made the icon of JGR from the JGR site. I also customized the user interface. The screenshot is the from Lin4Neuro.

以前、Linuxでhomeディレクトリ以下の日本語ディレクトリを英語に変えたいにおいて、homeディレクトリ以下の日本語を英語に変えたい場合、
$ LANG=C xdg-user-dirs-gtk-update
とすればよいと書きました。
これは今でもその通りなのですが、ときにこれが動かないことがあります。
コマンドを打っても何も反応しないのです。
(その理由ははっきりしないのですが…)
そんな時の対策を探していたら、こちらに書いてありました。
端的に言うならば、以下のコマンドを打ちます。
$ xdg-user-dirs-update --force
このあと、もう一度
$ LANG=C xdg-user-dirs-gtk-update
とすると、設定ダイアログが出て、英語のディレクトリ名に変更することができます。
備忘録として残しておきます。
SPMを使っていると、Covariateという単語がよく出てきます。
Covariateを日本語に訳すと、「共変量」となりますが、SPMでのCovariateはもうちょっと広い気がしていました。
Matthew BrettのIntroduction to SPM statisticsを翻訳したものに対し、他の先生方からご指摘をいただき、改めて検討してみました。
Wikipedia英語版では、covariateについて以下のように説明されています。
In statistics, a covariate is a variable that is possibly predictive of the outcome under study. A covariate may be of direct interest or it may be a confounding or interacting variable.
ここで、covariateは結果を予測する変数であり、直接関心のある変数のこともあれば、そうでないこともあると書かれています。日本語の「共変量」の意味するところは、後者のことだけを指しますので、英語のcovariateの方が広義ということになります。
Wikipediaに戻ります。
The alternative terms explanatory variable , independent variable , or predictor, are used in a regression analysis . In econometrics , the term “control variable” is usually used instead of “covariate”.
上記で述べたように、covariateは説明変数、独立変数、予測因子とも表現されると書かれています。
さらに、以下のようにも述べられています。
In a more specific usage, a covariate is a secondary variable that can affect the relationship between the dependent variable and other independent variables of primary interest.
ここで、「より狭義の意味では、covariateは従属変数と最も関心のある独立変数との関係に影響を与える二次的な変数である」となっています。これがまさに日本語に訳されるところの「共変量」ということになります。
つまり、covariateには、広義のcovariateと狭義のcovariateがあり、狭義のcovariateは日本語で言うところの共変量を指し、広義のcovariateは、回帰分析における説明変数のような変数も入ってくるわけです。
ということで、タイトルになるわけですが、SPMにおいては、共変量⊂Covariateではあるが、共変量=Covariateではないということに注意が必要です。
説明をするときには気をつける必要がありますね。
画像解析についての日本語ドキュメントをこのブログにあげておりましたが、一定のニーズがあるようなので、画像解析リソースのページを作成しました。
今後、この画像解析リソースページにドキュメントをアップしていきます。
私がSPMについて学び始めたころ、SPMの統計のところについての入門書的なリソースがないか探していた時に、Matthew BrettのIntroduction to SPM statisticsに出会いました。1999年に書かれたものなので、SPM96とSPM99を対象に書かれていますが、原則は同じですので、今でも十分に役立ちます。SPMの統計の基本を学びたい方にとっては必読と思います。
このたび、Matthew Brettから許可を得て日本語に翻訳しました。SPMの日本語リソースがまだまだ少ない中、お役に立てれば幸いです。
このブログでも今までに紹介し、そしてLin4Neuroでも採用させていただいてきたNeurodebianですが、開発者のYarsolav Halchenkoといろいろやりとりした結果、日本でミラーサイトを立ち上げました。最近はファイルサイズの大きなものもありますので、日本からの場合、このミラーサイトを使っていただいたら、ダウンロード時間を短縮できる可能性があります。
方法を簡単に説明します。
まず、http://neuro.debian.netにいきます。
トップページにある、”How to use this repository”を見ます。
そこに、下図にあるような感じでDebianかUbuntuのリリースとダウンロードサイトを選ぶドロップダウンメニューが出てきます。

そこに出てくる2行を端末にコピペします。Ubuntu 11.10の場合は以下の2行になります。
wget -O- http://neuro.debian.net/lists/oneiric.jp | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
それだけで設定はおしまいです。便利ですよね。
いろいろな画像解析関連ソフトが簡単にいれられますので、どうぞ利用してみてください。
今後は日本語版Lin4Neuroでもこの日本のミラーサイトをデフォルトにしていきます。
Tags: Neurodebian
64ビット版で、不要なファイルなどが入っていたので、スリムにしました。
こちらから、lin4neuro-amd64-Ja-20120104.isoをダウンロードしていただけたらと思います。
Tags: Lin4Neuro日本語版
Lin4Neuro日本語版を32bit版、64bit版ともにアップデートしました。
セキュリティアップデートをすべてかけているとともに、Javaの問題などに対応しています。
こちらからダウンロードできます。
Tags: Lin4Neuro日本語版
