@@ -104,14 +104,18 @@ BCIntervalSpearman = function( fD1, fD2, ordering='MEI', bootstrap_iterations=10
104
104
else
105
105
# when alpha1 * bootstrap_iterations is not an integer,
106
106
# a modification is used
107
- int1 = v [ floor( ( bootstrap_iterations + 1 ) * alpha1 ) ]
107
+ id = min(c(floor( ( bootstrap_iterations + 1 ) * alpha1 ), bootstrap_iterations ))
108
+ id = max(c(id , 1 ))
109
+ int1 = v [ id ]
108
110
109
111
# it's the case in which alpha2 * bootstrap_iterations is an integer
110
112
if ( alpha2 * bootstrap_iterations - floor( alpha2 * bootstrap_iterations ) == 0 )
111
113
int2 = v [ alpha2 * bootstrap_iterations ]
112
114
else
113
115
# when alpha2*bootstrap_iterations is not an integer,
114
116
# a modification is used
117
+ id = min( c( floor( ( bootstrap_iterations + 1 ) * alpha2 ), bootstrap_iterations ) )
118
+ id = max( c( id , 1 ) )
115
119
int2 = v [ floor( ( bootstrap_iterations + 1 ) * alpha2 ) ]
116
120
117
121
return ( list ( lower = int1 , upper = int2 ) )
@@ -184,12 +188,18 @@ BCIntervalSpearmanMultivariate = function(mfD,
184
188
{
185
189
for ( jL in (iL + 1 ): mfD $ L )
186
190
{
191
+ if ( verbose )
192
+ {
193
+ message(paste0(' Bootstrap of components (' , iL , ' , ' , jL , ' )' ))
194
+ }
195
+
187
196
interval = BCIntervalSpearman( mfD $ fDList [[ iL ]],
188
197
mfD $ fDList [[ jL ]],
189
198
ordering = ordering ,
190
199
bootstrap_iterations = bootstrap_iterations ,
191
200
alpha = alpha ,
192
201
verbose = verbose )
202
+
193
203
lower [ iL , jL ] = interval $ lower
194
204
lower [ jL , iL ] = lower [iL , jL ]
195
205
0 commit comments