Blyx Nest Blyx language
Registry / Library
library · v0.1.1

StdWeight

Directly standardize stratum-specific rates to a reference population.

Source repository · Package JSON

Use StdWeight

use vendor::stdweight::stdweight;

Run the example

nest demo stdweight@0.1.1
blyxc native-run stdweight-demo/main.blyx
Example source and expected output
use vendor::stdweight::stdweight;

fn main() {
    let events = [1, 6];
    let trials = [4, 8];
    let weights = [1, 1];
    let result = stdweight_direct(events, trials, weights);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

0.5
2

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP7b71c765a8ad57c34d20a2ff5b02d30e571556c21bb3d8313086a82ae1a67c1d6438b5a04e