5

r の lme4 パッケージで混合効果ロジスティック回帰モデルを構築して実行し、さまざまな場所 (細胞/生息地) での魚の占有確率を推定しました。データ フレームは、68 匹の魚の 1,207,140 回の観測で構成されています。各個人 (1 日あたり ~ 1 年間) について、すべての場所での合計発生数に対する各固有の場所での発生数を示します。

ベースモデルは次のとおりです。

    m.base = glmer(cbind(N,t.move-N) ~ jdate + snSurface.Area + Restoration..P.A. +    
    Release.Location+ Sex + (1|Station) + (0 + jdate|ID), data=allfishdat, family=binomial)
where N=# unique positions, t.move=total positions, jdate=julian date, Station=locations, ID=fish ID

次の警告メッセージが表示されます。

Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
                Model failed to converge with max|grad| = 3349.26 (tol = 0.001)
2: In if (resHess$code != 0) { :
 the condition has length > 1 and only the first element will be used
3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
 Model is nearly unidentifiable: very large eigenvalue
 - Rescale variables?;Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?

これらのメッセージの意味とモデルへの影響を理解するために検索を行いましたが、警告についてはまだ理解していません。

4

1 に答える 1

2

最初の問題が、R が収束に到達するまでにより多くの反復を行う必要があることに関係している場合は、以下のコードが役立つ可能性があります。「20000」を、特定のモデルにとって意味のある最大反復回数に置き換えます。(元のモデル コードは最後に「control = my.control」を含めるように変更されていることに注意してください。)

my.control=lmerControl(optCtrl=list(maxfun=20000); my.control

m.base = glmer(cbind(N,t.move-N) ~ jdate + snSurface.Area + Restoration..P.A. +  Release.Location+ Sex + (1|Station) + (0 + jdate|ID), data=allfishdat, family=binomial, control = my.control)

次のコマンドを使用して、現在の lmeControls を確認することも役立つ場合があります。

str(lmerControl())

さらに、この以前の回答が役立つ場合があります。 lmer の新しいバージョンの反復を増やしますか?

于 2014-06-15T18:27:56.673 に答える