Skip to contents

Simulates from a uniform distribution over all R-vine structures on d variables. rvine_structure_sim() returns an rvine_structure() object, rvine_matrix_sim() an rvine_matrix().

Usage

rvine_structure_sim(d, natural_order = FALSE)

rvine_matrix_sim(d, natural_order = FALSE)

Arguments

d

the number of variables

natural_order

boolean; whether the structures should be in natural order (counter-diagonal is 1:d).

Examples

rvine_structure_sim(10)
#> 10-dimensional R-vine structure ('rvine_structure')
#> 10  5  5 10  4  4  4 10 10 10
#>  3  4  4  3  5 10 10  4  4   
#>  4 10 10  4 10  3  3  3      
#>  2  3  3  2  3  5  5         
#>  5  6  6  5  2  2            
#>  6  2  2  6  6               
#>  9  9  9  9                  
#>  7  7  7                     
#>  1  1                        
#>  8                           

rvine_structure_sim(10, natural_order = TRUE)  # counter-diagonal is 1:d
#> 10-dimensional R-vine structure ('rvine_structure')
#>  8  6  6  9  9 10 10 10 10 10
#> 10 10 10 10 10  9  9  9  9   
#>  9  9  9  8  8  8  8  8      
#>  6  8  8  7  7  7  7         
#>  3  7  7  6  6  6            
#>  7  4  5  5  5               
#>  5  5  4  4                  
#>  4  3  3                     
#>  2  2                        
#>  1                           

rvine_matrix_sim(10)
#> 10-dimensional R-vine matrix ('rvine_matrix')
#>  8 10  2  2  2  2  2  2  2  2
#>  2  2  3  7  7  7 10 10 10   
#>  7  5  7 10 10 10  7  7      
#> 10  7 10  5  5  5  5         
#>  5  1  5  8  8  8            
#>  3  8  8  3  3               
#>  1  3  1  1                  
#>  4  4  4                     
#>  9  9                        
#>  6