Population RSF matrix multiplication error: "Error in JP %*% COV.POV : non-conformable arguments"

23 views
Skip to first unread message

Smith Freeman

unread,
Jul 22, 2024, 1:52:39 PM (5 days ago) Jul 22
to ctmm R user group
Hi -

I've fit several individual RSFs to marten data and am trying to get the population model from them. I initially tried to fit the population model to all 8 individual models and then scaled it back to just 2 when I got this error, but am still getting the error. 

I've provided a summary below, but here is a folder with the two models and the full stack trace:  https://drive.google.com/drive/folders/1_tTvJh9PvlOQHMgu_f6Hj0oU_SVOh9ng?usp=sharing
 
Thank you!

- Smith

The code:
model_f20 <- readRDS(“res_10_simple.rds”))$rsf_model
model_f17 <- readRDS(“res_10_simple.rds”))$rsf_model
pop_model <- mean(list(model_f20, model_f17))

The error:
Error in JP %*% COV.POV : non-conformable arguments
In addition: Warning messages:
1: In sqrt(D) : NaNs produced
2: In sqrt(D) : NaNs produced
3: In sqrt(D) : NaNs produced
4: In sqrt(D) : NaNs produced
5: In sqrt(D) : NaNs produced
6: In sqrt(D) : NaNs produced
7: In sqrt(D) : NaNs produced
8: In sqrt(D) : NaNs produced
9: In sqrt(D) : NaNs produced
10: In sqrt(D) : NaNs produced

The Models:
Very few of the coefficients are actually significant, and some have pretty large confidence intervals, not sure if that will matter for the population model?

F17
$name
[1] "IID"

$DOF
     mean      area diffusion     speed
 673.7277  374.4467    0.0000    0.0000

$CI
                                          low           est         high
complex_enn (1/complex_enn)     -1.365648e+02  0.0003725516 1.365655e+02
simple_enn (1/simple_enn)       -4.437197e-01  0.0070372430 4.577942e-01
enn (1/enn)                     -4.526354e-01  0.0008556557 4.543467e-01
complex_shape (1/complex_shape) -1.592701e+05  0.0972754978 1.592703e+05
simple_shape (1/simple_shape)   -2.246741e+02 -0.0795130429 2.245151e+02
shape (1/shape)                 -2.249063e+02 -0.0615257740 2.247832e+02
complex_area (1/complex_area)   -7.930371e+02  0.0020458375 7.930412e+02
simple_area (1/simple_area)     -3.492268e+01  0.0005538785 3.492379e+01
area (1/area)                   -3.487383e+01  0.0095062143 3.489284e+01
complex (1/complex)             -2.683093e+05  0.4540779492 2.683102e+05
simple (1/simple)               -3.207481e+02  1.5682409938 3.238846e+02
area (square kilometers)         3.068567e+00  3.4047301800 3.758114e+00


F20
$name
[1] "IID"

$DOF
     mean      area diffusion     speed
 823.4906  829.7307    0.0000    0.0000

$CI
                                          low           est         high
complex_enn (1/complex_enn)     -0.0677026291 -3.947327e-02 -0.011243903
simple_enn (1/simple_enn)       -0.0005246391  9.576340e-03  0.019677319
enn (1/enn)                     -0.0099067352 -2.719650e-03  0.004467435
complex_shape (1/complex_shape) -0.5683118266  2.339449e-02  0.615100800
simple_shape (1/simple_shape)   -0.7056372588 -3.567515e-02  0.634286967
shape (1/shape)                 -0.5518197224  1.804114e-03  0.555427950
complex_area (1/complex_area)   -0.0272825244 -3.351030e-04  0.026612318
simple_area (1/simple_area)     -0.0263400744  6.884223e-04  0.027716919
area (1/area)                   -0.0269837817 -2.828494e-05  0.026927212
complex (1/complex)              0.5831911601  2.736397e+00  4.889602679
simple (1/simple)               -1.7853533044  1.014678e-01  1.988288900
area (square kilometers)         9.9825963762  1.069824e+01 11.438310242


Reply all
Reply to author
Forward
0 new messages