Package: SyScSelection 1.0.2

Merlin Kopfmann

SyScSelection: Systematic Scenario Selection for Stress Testing

Quasi-Monte-Carlo algorithm for systematic generation of shock scenarios from an arbitrary multivariate elliptical distribution. The algorithm selects a systematic mesh of arbitrary fineness that approximately evenly covers an isoprobability ellipsoid in d dimensions (Flood, Mark D. & Korenko, George G. (2013) <doi:10.1080/14697688.2014.926018>). This package is the 'R' analogy to the 'Matlab' code published by Flood & Korenko in above-mentioned paper.

Authors:Merlin Kopfmann

SyScSelection_1.0.2.tar.gz
SyScSelection_1.0.2.tar.gz(r-4.5-noble)SyScSelection_1.0.2.tar.gz(r-4.4-noble)
SyScSelection_1.0.2.tgz(r-4.4-emscripten)SyScSelection_1.0.2.tgz(r-4.3-emscripten)
SyScSelection.pdf |SyScSelection.html
SyScSelection/json (API)

# Install 'SyScSelection' in R:
install.packages('SyScSelection', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.70 score 3 scripts 99 downloads 7 exports 1 dependencies

Last updated 4 years agofrom:b1b7e61004. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 18 2024
R-4.5-linuxOKDec 18 2024

Exports:hypercube_meshhyperellipsoidmake_ellipsoid_from_verticessizeparam_normal_distnsizeparam_t_distnunivariate_shocksvertices

Dependencies:pracma

Usage

Rendered fromUsage.Rmdusingknitr::rmarkdownon Dec 18 2024.

Last update: 2020-06-30
Started: 2020-06-30

Readme and manuals

Help Manual

Help pageTopics
Adds the next base-b element to an existing base-b sequencebaseb_expansion
Calculates the number of points in a mesh of fineness phi, covering a hypercube in d dimensionscalc_mesh_size
Creates a new ellipsoid object equivalent to the given hyperellipsoid (hellipse), but centered at the origin.center_at_origin
Creates a phi x phi grid (i.e., the mesh on a single two-dimensional face of a larger hypercube) of d-dimensional points, where the regularity of the grid has been adjusted to avoid clustering in the corners.fill_adj_2Dface
Calculates the factor, beta in [0, 1], that interpolates the pth equidistant point between the two endpoints, z_one and z_phi, for and adjusted 2D mesh of fineness phi in d dimensions.fill_adj_2Dface_beta
Systematically fills a given mesh array (cmesh) with d-dimensional points representing every corner of a d-dimensional hypercube. The function fills the successive dimensions of each point via depth-first recursion across all d dimensions.fill_corners
Get hyperellipsoid property from the specified object and return the value. Property names are: center, shape, and sizeget
Generates a Cartesian mesh of d-dimensional scenarios based on the given ellipsoid. This function does not assume that the ellipsoid is centered at the origin.hypercube_mesh
Hyperellipsoid class constructorhyperellipsoid
Fills a mesh (corn_mesh) with d-dimensional points representing all corners of a d-dimensional cube encompassing a d-dimensional unit spheroid.make_corners
Fills a mesh with d-dimensional points representing all non-corner edge points of a d-dimensional cube encompassing a d-dimensional unit spheroid.make_edges
Constructs a new d-dimensional ellipsoid with the given "positive vertices", and size parameter, c. The constructed ellipsoid is centered at the origin.Note that the input vertices (i.e., the columns of V) must therefore be orthogonal vectors, themselves centered at the origin.The size parameter, c, may be needed because the points alone only determine the eigenvalues up to a positive constant. For vertices which fall on the constructed ellipsoid, choose as the size parameterc = 1.The new ellipsoid is centered at the origin.make_ellipsoid_from_vertices
Fills a mesh with d-dimensional points representing all non-edge face points of a d-dimensional cube encompassing a d-dimensional unit spheroid.make_faces
Creates a new base-b sequence of a designated lengthnew_baseb_expansion
Rotates the ellipsoid (hellip) so its principal axes align with the coordinate axes. Both ellipsoids are centered at the origin. Note that there are (2^d)*d! valid ways to rotate the ellipsoid to the axes. This algorithm does not prescribe which solution will be provided.rotate_to_coordaxes
Calculates the size paramater for a d-dimensional hyperellipsoid conforming to a normal (i.e., Gaussian) distribution.sizeparam_normal_distn
Calculates the size paramater for a d-dimensional hyperellipsoid conforming to a Student's t distribution.sizeparam_t_distn
Generates a Cartesian mesh of d-dimensional scenarios based on the given ellipsoid. This function does not assume that the ellipsoid is centered at the origin.spheroid_mesh
Stretches the ellipsoid (hellip) to the unit spheroid of the same dimension. Both the input ellipsoid and unit spheroid are centered at the origin.stretch_to_unitspheroid
Applies the given linear transformation, tfm, to the given ellipsoid. The ellipsoid (hellip) must be centered at the origin.transform_ellipsoid
Calculates 2d d-dimensional univariate shocks (up and down in each of the d dimensions) based on the given ellipsoid. Univariate shocks are points on the surface of the ellipsoid that differ from the center of the ellipsoid in only one dimension. Thus, for an ellipsoid centered at the origin, only one element of a d-dimensional shock will be non-zero.This function does not assume that the ellipsoid is centered at the origin.univariate_shocks
Finds the d d-dimensional positive vertices for the given ellipsoid. A "positive" vertex is one where a principal axis for the ellipsoid intersects the surface of the ellipsoid in the direction of the corresponding eigenvector. (Recall that each of the eigenvectors of the ellipsoid's shape matrix is collinear with one of the principal axes.) This function does not assume that the ellipsoid is centered at the origin. Because the direction of each unit eigenvector is arbitrary (i.e., multiplication by -1 still yields a unit eigenvector), a simple algorithm is used to pick a consistent orientation for the vertex points.vertices