Skip to contents

Package overview

rmorie rmorie-package
morie: Multi-Domain Open Research and Inferential Estimation

Datasets & catalog

Discover and load the bundled + fetched public-data catalogue.

morie_datasets_arcgis_item_by_id()
Generic by-id loader for any ArcGIS Online Feature Service item
morie_datasets_arcgis_item_metadata()
Resolve any ArcGIS Online item id to its FeatureServer URL + canonical metadata
morie_datasets_arsau_aggregate_summary()
Ontario Use-of-Force aggregate summary (5-year 2020-2022, pre-RBDS rollup)
morie_datasets_arsau_detailed_dataset()
Ontario Use-of-Force detailed dataset (5-year 2020-2022, pre-RBDS)
morie_datasets_arsau_uof_individual_records()
Ontario Use-of-Force individual records (one row per individual-in-incident)
morie_datasets_arsau_uof_main_records()
Ontario Use-of-Force main records (one row per incident)
morie_datasets_arsau_uof_probe_cycle_records()
Ontario Use-of-Force probe-cycle records (one row per CEW cartridge probe per individual-in-incident)
morie_datasets_arsau_uof_weapon_records()
Ontario Use-of-Force weapon records (one row per weapon per individual-in-incident)
morie_datasets_bigquery()
Pull a BigQuery table (or filtered slice) as a data.frame
morie_datasets_browse()
Browse + filter the morie cross-portal dataset catalog
morie_datasets_calgary_community_crime_stats() morie_datasets_calgary_fire_response_calls() morie_datasets_calgary_fire_stations()
Calgary Community Crime Statistics (sample)
morie_datasets_calgary_open_crime_adjacent_layers() morie_datasets_edmonton_open_crime_adjacent_layers() morie_datasets_ottawa_open_crime_adjacent_layers()
Calgary Open Data crime-adjacent catalog
morie_datasets_calgary_socrata_by_id() morie_datasets_edmonton_socrata_by_id()
Fetch a Calgary Open Data Socrata dataset by ID
morie_datasets_chicago_arrests()
City of Chicago Open Data – Arrests feed (dpt3-jri9)
morie_datasets_chicago_community_areas()
Chicago Community Area boundaries (cauq-8yn6)
morie_datasets_chicago_crime()
City of Chicago "Crimes – 2001 to Present" feed (ijzp-q8t2)
morie_datasets_chicago_crime_map()
City of Chicago "Crimes – 2001 to Present – Map" view (ahwe-kpsy)
morie_datasets_chicago_crime_odata()
City of Chicago Crimes feed via OData v4 (ijzp-q8t2)
morie_datasets_chicago_crime_resolved()
One-call Chicago crime + boundary + dictionary join
morie_datasets_chicago_crime_soql()
City of Chicago Crimes feed – arbitrary-SoQL escape hatch
morie_datasets_chicago_iucr_codes()
Chicago Police Department – Illinois Uniform Crime Reporting (IUCR) code dictionary (c7ck-438e)
morie_datasets_chicago_neighborhoods()
Chicago Neighborhoods boundary (Office of Tourism)
morie_datasets_chicago_police_beats()
Chicago Police Beats (current) boundaries (n9it-hstw)
morie_datasets_chicago_police_districts()
Chicago Police Districts (current) boundaries (24zt-jpfn)
morie_datasets_chicago_wards()
Chicago City Council Ward boundaries (sp34-6z76)
morie_datasets_cihi_data_tables()
Catalogue of CIHI open data-table workbooks
morie_datasets_ckan_package()
Pull every CSV resource of a CKAN package as a list of data frames
morie_datasets_ckan_search()
Search a CKAN open-data portal by free-text query
morie_datasets_corrections_uof_ethnic_origin()
Inmate-participant ethnic origin
morie_datasets_corrections_uof_incident_type()
Incident-type lookup
morie_datasets_corrections_uof_incidents()
Use-of-force incidents (head dataset)
morie_datasets_corrections_uof_indigenous()
Inmate-participant Indigenous identity
morie_datasets_corrections_uof_inmate_incident()
Inmate-to-incidents bridging table
morie_datasets_corrections_uof_inmate_participant()
Inmate-participant demographics (head)
morie_datasets_corrections_uof_institution_summary()
Institution-level annual incident summary
morie_datasets_corrections_uof_location_summary()
Location-of-incident annual summary
morie_datasets_corrections_uof_race()
Inmate-participant race
morie_datasets_corrections_uof_religion()
Inmate-participant religion
morie_datasets_corrections_uof_select_incident_summary()
Select-incident-type annual summary
morie_datasets_corrections_uof_staff_incident()
Staff-to-incidents bridging table
morie_datasets_cpads()
Load the Canadian Postsecondary Alcohol and Drug-use Survey (CPADS)
morie_datasets_cpd_public_arrests()
Chicago Police Department – Public Arrest Data (2014-2017)
morie_datasets_edmonton_police_stations() morie_datasets_edmonton_fire_stations()
Edmonton Police Station locations
morie_datasets_external_socrata_layers()
List the external Socrata datasets wrapped by morie
morie_datasets_load_by_key()
Load a dataset by its cross-portal catalog dataset_key
morie_datasets_montreal_ckan_resource()
Fetch records from any donnees.montreal.ca CKAN datastore resource
morie_datasets_montreal_justice_safety_layers()
Donnees Montreal "Loi, justice et securite publique" catalog
morie_datasets_montreal_sim_intervention_types()
SIM intervention TYPE -> French description dictionary
morie_datasets_montreal_sim_interventions()
SIM Montreal Fire Service intervention records (sample)
morie_datasets_namus_missing_persons()
NamUs missing-persons case metadata
morie_datasets_nibrs()
FBI NIBRS offence-event records via the Crime Data Explorer API
morie_datasets_nist_rds()
NIST Reference Datasets (RDS) catalog metadata
morie_datasets_nyc_boroughs()
NYC Borough Boundaries (gthc-hcne)
morie_datasets_nyc_boundaries_catalog()
Unified catalog of NYC OpenData boundary loaders
morie_datasets_nyc_community_districts()
NYC community district boundaries
morie_datasets_nyc_council_districts()
NYC City Council district boundaries
morie_datasets_nyc_ntas_2020()
NYC Neighborhood Tabulation Areas (2020)
morie_datasets_nyc_nypd_arrests_historic()
NYPD Arrests Data (Historic)
morie_datasets_nyc_nypd_arrests_ytd()
NYPD Arrest Data (Year to Date)
morie_datasets_nyc_nypd_boro_crosswalk()
NYPD borough-code cross-reference (1-letter / UPPER / numeric)
morie_datasets_nyc_nypd_by_key()
Generic NYC NYPD dataset loader by registry key
morie_datasets_nyc_nypd_complaint_historic()
NYPD Complaint Data Historic
morie_datasets_nyc_nypd_complaint_ytd()
NYPD Complaint Data Current (Year To Date)
morie_datasets_nyc_nypd_hate_crimes()
NYPD Hate Crimes
morie_datasets_nyc_nypd_law_books()
NYS / NYC statute book code dictionary
morie_datasets_nyc_nypd_layers()
List the NYPD criminal-justice Socrata datasets wrapped by morie
morie_datasets_nyc_nypd_offense_codes()
NYPD offense-code dictionary (ky_cd + pd_cd + descriptions)
morie_datasets_nyc_nypd_resolved()
One-call NYPD data + borough + precinct join
morie_datasets_nyc_nypd_uof_incidents()
NYPD Use of Force Incidents
morie_datasets_nyc_nypd_uof_subjects()
NYPD Use of Force: Subjects
morie_datasets_nyc_nypd_vehicle_stops()
NYPD Vehicle Stop Reports
morie_datasets_nyc_opendata_bulk_layers() morie_datasets_chicago_opendata_bulk_layers() morie_datasets_toronto_opendata_bulk_layers() morie_datasets_calgary_opendata_bulk_layers() morie_datasets_edmonton_opendata_bulk_layers() morie_datasets_ottawa_opendata_bulk_layers() morie_datasets_montreal_opendata_bulk_layers() morie_datasets_vancouver_opendata_bulk_layers()
NYC OpenData bulk catalog (2851 entities)
morie_datasets_nyc_police_precincts()
NYC Police Precincts boundary layer (y76i-bdw7)
morie_datasets_nyc_school_districts()
NYC public school district boundaries (NYS K-12)
morie_datasets_nyc_socrata_by_id() morie_datasets_chicago_socrata_by_id()
Fetch a NYC OpenData Socrata dataset by ID
morie_datasets_nyc_stop_and_frisk()
NYPD Stop, Question and Frisk (SQF) microdata via NYC OpenData
morie_datasets_nyc_zctas()
NYC ZIP Code Tabulation Areas (ZCTAs)
morie_datasets_ontario_ckan_by_key()
Generic Ontario CKAN dataset loader (by registry key)
morie_datasets_ontario_ckan_layers()
List the Ontario CKAN datasets wrapped by morie
morie_datasets_otis_a01()
Load the OTIS A01 Restrictive-Confinement Detailed Dataset
morie_datasets_otis_a01_restrictive_confinement()
OTIS a01 – Restrictive Confinement (detailed per-individual)
morie_datasets_otis_b01_segregation_detailed()
OTIS b01 – Segregation detailed (per-individual episodes)
morie_datasets_otis_b02_segregation_total_days()
OTIS b02 – Segregation total days per individual
morie_datasets_otis_b03_seg_alerts_by_institution()
OTIS b03 – Segregation placements: alerts + hold by institution
morie_datasets_otis_b04_seg_consecutive_by_region()
OTIS b04 – Segregation consecutive durations by region
morie_datasets_otis_b05_seg_consecutive_lengths()
OTIS b05 – Segregation placements by consecutive-length bucket
morie_datasets_otis_b06_seg_reason_by_institution()
OTIS b06 – Segregation placements: reason for placement by institution
morie_datasets_otis_b07_seg_alerts_by_gender()
OTIS b07 – Segregation placements: alerts + hold by gender
morie_datasets_otis_b08_seg_consecutive_by_institution()
OTIS b08 – Segregation consecutive durations by institution
morie_datasets_otis_b09_seg_n_times()
OTIS b09 – Individuals in segregation by number of times placed
morie_datasets_otis_c01_individuals_total()
OTIS c01 – Total individuals (in custody / restrictive confinement / segregation)
morie_datasets_otis_c02_individuals_by_institution()
OTIS c02 – Individuals by institution
morie_datasets_otis_c03_individuals_race_by_gender()
OTIS c03 – Individuals by race x gender
morie_datasets_otis_c04_individuals_race_by_region()
OTIS c04 – Individuals by race x region
morie_datasets_otis_c05_individuals_religion_by_region()
OTIS c05 – Individuals by religion x region
morie_datasets_otis_c06_individuals_age_by_region()
OTIS c06 – Individuals by age category x region
morie_datasets_otis_c07_individuals_alerts()
OTIS c07 – Individuals: alerts + hold flags
morie_datasets_otis_c08_individuals_religion_by_gender()
OTIS c08 – Individuals by religion x gender
morie_datasets_otis_c09_individuals_age_by_gender()
OTIS c09 – Individuals by age category x gender
morie_datasets_otis_c10_aggregate_durations_by_institution()
OTIS c10 – Aggregate durations by institution
morie_datasets_otis_c11_aggregate_lengths()
OTIS c11 – Aggregate lengths
morie_datasets_otis_c12_aggregate_durations_by_region()
OTIS c12 – Aggregate durations by region
morie_datasets_otis_d01_deaths_in_custody()
OTIS Deaths-in-Custody detailed dataset (d01)
morie_datasets_otis_d02_deaths_by_gender()
OTIS d02 – Deaths in custody by gender
morie_datasets_otis_d03_deaths_by_race()
OTIS d03 – Deaths in custody by race
morie_datasets_otis_d04_deaths_by_religion()
OTIS d04 – Deaths in custody by religion
morie_datasets_otis_d05_deaths_by_age_category()
OTIS d05 – Deaths in custody by age category
morie_datasets_otis_d06_cause_by_alert()
OTIS d06 – Deaths in custody by alert type x institution
morie_datasets_otis_d07_alerts_by_housing_unit()
OTIS d07 – Deaths in custody alerts x housing unit
morie_datasets_siu_director_reports()
SIU director's-reports index (legacy PDF anchors)
morie_datasets_siu_report_fields()
Extract structured fields from an SIU director's-report text or URL
morie_datasets_siu_report_text()
Download an SIU director's-report PDF and return its plain text
morie_datasets_statcan_ccjs_cubes()
Statistics Canada CCJS cube registry (curated subset)
morie_datasets_statcan_cube_metadata()
Fetch a StatCan cube's metadata (dimensions + members) via WDS
morie_datasets_statcan_full_csv_url()
Get the bulk-CSV download URL for a StatCan cube
morie_datasets_statcan_vectors()
Fetch the latest N periods for a set of StatCan vectors via WDS
morie_datasets_summary()
Tally the cross-portal catalog by source + api_mode
morie_datasets_toronto_ambulance_stations()
Toronto Ambulance station locations
morie_datasets_toronto_asr_miscellaneous()
TPS Annual Statistical Report – Miscellaneous data (aggregated)
morie_datasets_toronto_open_ckan_resource()
Fetch records from any open.toronto.ca CKAN resource
morie_datasets_toronto_open_crime_adjacent_layers()
Toronto Open Data crime-adjacent CKAN catalog
morie_datasets_toronto_zoning_per_neighbourhood()
Toronto Zoning per Neighbourhood (EsriCanadaEducation)
morie_datasets_tps_2008_firs()
2008 FIRS
morie_datasets_tps_2009_firs()
2009 FIRS
morie_datasets_tps_2010_firs()
2010 FIRS
morie_datasets_tps_2011_firs()
2011 FIRS
morie_datasets_tps_2012_firs()
2012 FIRS
morie_datasets_tps_2013_firs()
2013 FIRS
morie_datasets_tps_administrative()
Administrative (ASR-AD-TBL-001)
morie_datasets_tps_arcgis_hub_by_id()
Generic TPS ArcGIS Hub dataset loader by hub_id
morie_datasets_tps_arcgis_hub_download()
Direct multi-format downloader (binary or text) for a TPS Hub item
morie_datasets_tps_arcgis_hub_layers()
List the Toronto Police Service ArcGIS Hub datasets wrapped by morie
morie_datasets_tps_arrested_and_charged_persons()
Arrested and Charged Persons (ASR-ENF-TBL-001)
morie_datasets_tps_arrests_and_strip_searches()
Arrests and Strip Searches (RBDC-ARR-TBL-001)
morie_datasets_tps_assault()
TPS PSDP – Assault
morie_datasets_tps_automobile_ksi()
Automobile KSI
morie_datasets_tps_autotheft()
TPS PSDP – Auto Theft
morie_datasets_tps_bicycle_thefts()
Bicycle Thefts Open Data
morie_datasets_tps_bicycletheft()
TPS PSDP – Bicycle Theft
morie_datasets_tps_breakandenter()
TPS PSDP – Break and Enter
morie_datasets_tps_budget_2020()
Budget_2020
morie_datasets_tps_budget_2021()
Budget_2021
morie_datasets_tps_budget_2022()
Budget_2022
morie_datasets_tps_budget_2023()
Budget_2023
morie_datasets_tps_budget_2024()
Budget_2024
morie_datasets_tps_budget_2025()
Budget_2025
morie_datasets_tps_budget_2026()
Budget_2026
morie_datasets_tps_budget_by_command()
Budget_by_Command
morie_datasets_tps_calls_for_service_attended()
Calls for Service Attended (ASR-CS-TBL-003)
morie_datasets_tps_community_safety_indicators()
Community Safety Indicators Open Data
morie_datasets_tps_complaint_dispositions()
Complaint Dispositions (ASR-PCF-TBL-003)
morie_datasets_tps_cyclist_ksi()
Cyclist KSI
morie_datasets_tps_dispatched_calls_by_division()
Dispatched Calls by Division (ASR-CS-TBL-001)
morie_datasets_tps_facilities()
Facilities
morie_datasets_tps_fatals_ksi()
Fatals KSI
morie_datasets_tps_firearms_top_calibres()
Firearms Top Calibres (ASR-F-TBL-001)
morie_datasets_tps_gross_expenditures_by_division()
Gross Expenditures by Division (ASR-PB-TBL-001)
morie_datasets_tps_gross_operating_budget()
Gross Operating Budget (ASR-PB-TBL-005)
morie_datasets_tps_hatecrimes()
TPS PSDP – Hate Crimes
morie_datasets_tps_homicide()
TPS Homicides feed
morie_datasets_tps_homicides()
TPS PSDP – Homicides
morie_datasets_tps_intimate_partner_family_violence()
TPS PSDP – Intimate Partner and Family Violence
morie_datasets_tps_investigated_alleged_misconduct()
Investigated Alleged Misconduct (ASR-PCF-TBL-002)
morie_datasets_tps_killed_and_seriously_injured()
Killed and Seriously Injured
morie_datasets_tps_layers()
List the TPS open-data layers included with morie
morie_datasets_tps_major_crime()
TPS Major Crime Indicators feed
morie_datasets_tps_mha_apprehensions()
TPS Mental Health Act Apprehensions (PSDP)
morie_datasets_tps_miscellaneous_calls_for_service()
Miscellaneous Calls for Service (ASR-CS-TBL-002)
morie_datasets_tps_miscellaneous_data()
Miscellaneous Data (ASR-MISC-TBL-001)
morie_datasets_tps_miscellaneous_firearms()
Miscellaneous Firearms (ASR-F-TBL-003)
morie_datasets_tps_motorcylist_ksi()
Motorcylist KSI
morie_datasets_tps_neighbourhood_crime_rates()
Neighbourhood Crime Rates Open Data
morie_datasets_tps_passenger_ksi()
Passenger KSI
morie_datasets_tps_patrol_zone()
Patrol Zone
morie_datasets_tps_pedestrian_ksi()
Pedestrian KSI
morie_datasets_tps_personnel_by_command()
Personnel by Command (ASR-PB-TBL-004)
morie_datasets_tps_personnel_by_rank()
Personnel by Rank (ASR-PB-TBL-002)
morie_datasets_tps_personnel_by_rank_by_division()
Personnel by Rank by Division (ASR-PB-TBL-003)
morie_datasets_tps_persons_in_crisis_calls_for_service_attended()
Persons in Crisis Calls for Service Attended Open Data
morie_datasets_tps_police_divisions()
Toronto Police Service police division boundaries
morie_datasets_tps_psdp_resolved()
One-call TPS PSDP data + boundary metadata join
morie_datasets_tps_regulated_interactions()
Regulated Interactions (ASR-RI-TBL-001)
morie_datasets_tps_reported_crimes()
Reported Crimes (ASR-RC-TBL-001)
morie_datasets_tps_robbery()
TPS PSDP – Robbery
morie_datasets_tps_search_of_persons()
Search of Persons (ASR-SP-TBL-001)
morie_datasets_tps_shooting_firearm_discharges()
TPS PSDP – Shooting and Firearm Discharges
morie_datasets_tps_shootings()
TPS Shootings and Firearm Discharges feed
morie_datasets_tps_staffing_by_command()
Staffing_by_Command
morie_datasets_tps_theft_from_motor_vehicle()
TPS PSDP – Theft From Motor Vehicle
morie_datasets_tps_theft_over()
TPS PSDP – Theft Over
morie_datasets_tps_tickets_issued()
Tickets Issued (ASR-ENF-TBL-002)
morie_datasets_tps_top_20_offences_of_firearm_seizures()
Top 20 Offences of Firearm Seizures (ASR-F-TBL-002)
morie_datasets_tps_total_public_complaints()
Total Public Complaints (ASR-PCF-TBL-001)
morie_datasets_tps_traffic_collisions()
Traffic Collisions Open Data (ASR-T-TBL-001)
morie_datasets_tps_use_of_force_call_for_service_types()
Use of Force: Call for Service Types (RBDC-UOF-TBL-004)
morie_datasets_tps_use_of_force_call_sources_by_month()
Use of Force: Call Sources by Month (RBDC-UOF-TBL-001)
morie_datasets_tps_use_of_force_gender_composition()
Use of Force: Gender Composition (RBDC-UOF-TBL-006)
morie_datasets_tps_use_of_force_location_of_occurrences()
Use of Force: Location of Occurrences (RBDC-UOF-TBL-003)
morie_datasets_tps_use_of_force_occurrence_category()
Use of Force: Occurrence Category (RBDC-UOF-TBL-005)
morie_datasets_tps_use_of_force_time_of_day_trends()
Use of Force: Time of Day Trends (RBDC-UOF-TBL-002)
morie_datasets_tps_use_of_force_use_of_force_types_and_perceived_weapons()
Use of Force: Use of Force Types and Perceived Weapons (RBDC-UOF-TBL-007)
morie_datasets_tps_victims_of_crime()
Victims of Crime (ASR-VC-TBL-001)
morie_datasets_vancouver_opendata_by_id()
Fetch records from a Vancouver Open Data dataset by ID
morie_datasets_vancouver_opendata_layers()
Vancouver Open Data full dataset catalog (Opendatasoft v2.1)
morie_datasets_vic_cache_dir()
Local cache directory for the Victorian workbooks
morie_datasets_vic_catalog()
Catalog of the Victorian Crime Statistics Agency data tables
morie_datasets_vic_sheets()
Sheet names in a cached Victorian workbook
morie_datasets_vic_table()
Read one Victorian crime data table
morie_datasets_vpd_crime()
Load Vancouver Police Department crime incident data
morie_datasets_vpd_legal_disclaimer()
Read VPD's legal disclaimer (included verbatim from the zip)
morie_datasets_vancouver_graffiti() morie_datasets_vancouver_noise_control_areas() morie_datasets_vancouver_homeless_shelters() morie_datasets_vancouver_property_use_inspection_districts() morie_datasets_vancouver_fire_halls() morie_datasets_vancouver_community_centres() morie_datasets_vancouver_community_food_markets() morie_datasets_vancouver_disability_parking() morie_datasets_vancouver_public_art()
Included Vancouver Open Data crime-adjacent civic datasets
morie_dataset_catalog()
List all datasets in the MORIE catalog
morie_dataset_column_profile()
Build a single-column profile record
morie_dataset_detect_role()
Detect the suggested epidemiological role of a column
morie_dataset_infer_level()
Infer the Stevens NOIR measurement level for a single vector
morie_dataset_info()
Get metadata for a single dataset
morie_dataset_load()
Load a dataset from a CSV / TSV / Excel / Parquet / JSON file
morie_dataset_portal_catalog()
Build the cross-portal dataset catalog
morie_dataset_portal_catalog_clear_cache()
Clear the session-scoped portal-catalog cache
morie_dataset_profile()
Fully profile a data frame without prior schema knowledge
morie_dataset_profile_summary_table()
Render a human-readable dataset profile summary table
morie_dataset_profile_to_list()
Serialize a dataset profile to a plain nested list
morie_dataset_suggest_plan()
Suggest an ordered analysis plan based on a dataset profile
morie_dataset_summarize_column()
Compute level-appropriate summary statistics for one column
morie_cpads_canonicalize_frame()
Canonicalize raw CPADS PUMF columns into morie's analysis schema
morie_cpads_contract()
Return the CPADS analysis-frame contract
morie_cpads_has_raw_columns()
Detect whether a data frame looks like raw CPADS PUMF data
morie_cpads_infer_file_format()
Infer the on-disk file format for a CPADS file path
morie_cpads_missing_variables()
Identify missing canonical CPADS variables in a column set
morie_cpads_validate_frame()
Validate a data frame against the canonical CPADS analysis contract
morie_cache_clear()
Clear morie's persistent cache directory
morie_cache_dir()
morie cache contract
morie_cache_file()
Cache local RDS/CSV data into the SQLite database
morie_cache_list()
List all tables in the MORIE cache
morie_cache_load()
Load a table from the MORIE cache
morie_cache_store()
Store a data frame in the MORIE cache

Data ingestion & fetching

Pull tables from open-data portals (CKAN, Socrata, StatCan, CIHI).

morie_ingest_a2aj_citation_edges()
Citation network edges from A2AJ case records
morie_ingest_a2aj_coverage()
A2AJ corpus coverage
morie_ingest_a2aj_download()
Download one A2AJ dataset's Parquet file
morie_ingest_a2aj_fetch()
Fetch one A2AJ document by citation
morie_ingest_a2aj_gaps()
Courts and tribunals the A2AJ corpus does not carry
morie_ingest_a2aj_load()
Load one A2AJ dataset as a data.frame
morie_ingest_a2aj_search()
Search A2AJ case law or legislation
morie_ingest_a2aj_url()
Parquet URL of one A2AJ dataset
morie_ingest_bigquery_build_sql()
Build a parameter-safe BigQuery SELECT
morie_ingest_bigquery_query()
Execute a BigQuery SQL query and return a data.frame
morie_ingest_bigquery_table()
Pull a BigQuery table (or filtered slice) into a data.frame
morie_ingest_canlii_case()
Metadata of one CanLII decision
morie_ingest_canlii_case_id()
CanLII identifiers from a neutral citation
morie_ingest_canlii_cases()
Decisions of one CanLII database
morie_ingest_canlii_citator()
Citation network of one CanLII decision
morie_ingest_canlii_databases()
CanLII case-law databases
morie_ingest_canlii_legislation()
Metadata of one CanLII statute or regulation
morie_ingest_canlii_legislation_databases()
CanLII legislation databases
morie_ingest_canlii_legislations()
Statutes or regulations of one CanLII legislation database
morie_ingest_chicago_crime()
Pull the City of Chicago "Crimes - 2001 to Present" feed
morie_ingest_chicago_crime_bigquery()
BigQuery mirror of the Chicago crime feed
morie_ingest_chicago_resources()
Built-in Chicago / Socrata resource registry
morie_ingest_chicago_socrata()
Fetch every row from a Socrata SoDA JSON endpoint
morie_ingest_cihi_xlsx()
Download a CIHI indicator .xlsx data table
morie_ingest_ckan_fetch_package_csvs()
Fetch every CSV / TSV resource in a CKAN package
morie_ingest_ckan_package_search()
Search a CKAN portal for packages (raw)
morie_ingest_ckan_package_show()
Fetch one CKAN package's metadata
morie_ingest_ckan_read_resource()
Download a CKAN resource as a data.frame
morie_ingest_ckan_resource_show()
Fetch one CKAN resource's metadata
morie_ingest_ckan_search_packages()
Search a CKAN portal and return a flat metadata data.frame
morie_ingest_forensics_namus_missing()
Pull NamUs missing-persons case metadata
morie_ingest_forensics_nibrs()
Pull FBI NIBRS offence-event records via Crime Data Explorer
morie_ingest_forensics_nist_rds()
Pull NIST Reference Datasets (RDS) catalog metadata
morie_ingest_statcan_cansim()
Fetch a Statistics Canada NDM / cansim table
morie_ingest_statcan_csv()
Download a StatCan PUMF / CSV product
morie_ingest_statcan_vectors()
Fetch StatCan series by vector ID (keyless WDS, latest-N periods)
morie_ingest_tps_feature_layer()
Fetch every feature from a TPS ArcGIS FeatureServer layer
morie_ingest_tps_fetch()
Fetch a TPS open-data layer by short name
morie_ingest_tps_layers()
Built-in TPS open-data layer registry
morie_fetch()
Fetch a dataset from any URL, with automatic format detection
morie_fetch_arcgis()
Query an ArcGIS FeatureServer / MapServer layer
morie_fetch_ckan()
Fetch data from the CKAN API and cache it
morie_fetch_csv()
Read CSV/TSV natively
morie_fetch_html()
Parse HTML natively (tolerant tag scanner, pure R)
morie_fetch_json()
Parse JSON text natively (pure R)
morie_fetch_naps()
Fetch one NAPS hourly air-quality file
morie_fetch_parquet()
Minimal native Parquet reader (pure R)
morie_fetch_siu()
Fetch the Ontario SIU corpus into a 64-column SIU.csv
morie_fetch_tps()
Fetch a TPS category from the Toronto Police ArcGIS REST endpoint
morie_fetch_unified()
Unified fetch dispatcher
morie_fetch_xml()
Parse XML natively into a list tree (pure R)

Causal inference: difference-in-differences

Staggered DiD, event studies, and modern heterogeneity-robust estimators.

morie_did()
Difference-in-differences with automatic staggered-design handling
morie_did_2x2()
Classic 2x2 Difference-in-Differences estimator
morie_did_aggregate_gt_att()
Aggregate group-time ATTs into summary parameters
morie_did_bacon_decomposition()
Goodman-Bacon decomposition of the TWFE DiD estimator
morie_did_borusyak()
Borusyak, Jaravel & Spiess (2024) imputation estimator
morie_did_chaisemartin_dhaultfoeuille()
Heterogeneity-robust DiD (de Chaisemartin & D'Haultfoeuille, 2020)
morie_did_continuous_treatment()
DiD with a continuous (dose) treatment
morie_did_diagnostics()
Comprehensive diagnostics for a 2x2 DiD setting
morie_did_did2s()
Gardner (2022) two-stage difference-in-differences
morie_did_doubly_robust()
Doubly-robust DiD (Sant'Anna & Zhao, 2020)
morie_did_event_study()
Event-study DiD specification
morie_did_fuzzy()
Fuzzy DiD (LATE) via 2SLS
morie_did_group_time_att()
Callaway–Sant'Anna group-time average treatment effects
morie_did_heterogeneous()
Heterogeneity-robust DiD by sub-group / moderator quantile
morie_did_honest_sensitivity()
Honest (relative-magnitudes) sensitivity for event-study estimates
morie_did_panel_fe()
Two-way fixed-effects DiD (panel)
morie_did_parallel_trends_data()
Group-by-time outcome means for parallel-trends visualisation
morie_did_placebo_test_group()
Placebo DiD on sub-groups expected to be unaffected
morie_did_placebo_test_outcome()
Placebo DiD on outcomes that should be unaffected
morie_did_placebo_test_time()
Placebo DiD at fake treatment times
morie_did_repeated_cross_section()
Repeated cross-section DiD (optionally weighted)
morie_did_sensitivity_analysis()
Sensitivity of DiD estimate to parallel-trends violations
morie_did_staggered()
Staggered DiD via group-time ATTs with aggregation
morie_did_sun_abraham()
Sun & Abraham (2021) interaction-weighted event study
morie_did_synthdid_estimate()
Synthetic DiD, explicit-name API (native)
morie_did_synthetic()
Synthetic Difference-in-Differences (Arkhangelsky et al., 2021)
morie_did_test_parallel_trends()
Pre-trend test for parallel trends
morie_did_triple_difference()
Triple-difference (DDD) estimator
morie_did_twoway_fe_weights()
Diagnose TWFE-DiD weights (de Chaisemartin & D'Haultfoeuille, 2020)
morie_did_wild_cluster_bootstrap()
DiD with wild cluster bootstrap p-values (Cameron-Gelbach-Miller, 2008)

Causal inference: IV & regression discontinuity

morie_iv_2sls()
Two-stage least squares with a weak-instrument refusal gate
morie_iv_anderson_rubin()
Anderson-Rubin (AR) weak-IV-robust test
morie_iv_anderson_rubin_ci()
Grid-based Anderson-Rubin confidence interval for a single endogenous variable
morie_iv_conditional_lr()
Conditional likelihood-ratio (CLR) test of Moreira (2003)
morie_iv_cragg_donald()
Cragg-Donald weak-instrument F statistic
morie_iv_cue_gmm()
Continuously-Updated GMM (CUE-GMM)
morie_iv_diagnostics()
Composite IV diagnostics
morie_iv_durbin_wu_hausman()
Durbin-Wu-Hausman test of endogeneity
morie_iv_first_stage_diagnostics()
First-stage F-statistics and partial R^2
morie_iv_gmm()
Generalised Method of Moments (GMM) IV
morie_iv_hansen_j()
Hansen J test of overidentifying restrictions (robust)
morie_iv_hausman()
Hausman test: OLS vs 2SLS
morie_iv_jive()
Jackknife IV (JIVE; Angrist, Imbens & Krueger 1999)
morie_iv_kleibergen_paap()
Kleibergen-Paap rk statistic and rk Wald F for weak identification
morie_iv_liml()
Limited-Information Maximum Likelihood (LIML)
morie_iv_montiel_olea_pflueger()
Montiel Olea-Pflueger effective F test for weak instruments
morie_iv_natural_bounds()
Instrumental-variable natural bounds
morie_iv_panel()
Panel IV with unit (and optional time) fixed effects via within-transform
morie_iv_probit()
IV Probit (Rivers-Vuong control function)
morie_iv_residual_analysis()
IV residual analysis
morie_iv_sargan()
Sargan test of overidentifying restrictions (homoskedastic)
morie_iv_split_sample()
Split-sample IV
morie_iv_stock_yogo()
Stock-Yogo critical values (TSLS maximal size, one endogenous regressor)
morie_iv_tsls()
Two-Stage Least Squares (2SLS)
morie_iv_wald()
Wald (single-instrument) estimator
morie_rdd()
Sharp / fuzzy regression discontinuity with bundled diagnostics
morie_rdd_bandwidth_cct()
MSE-optimal RD bandwidth (Calonico, Cattaneo and Farrell 2020)
morie_rdd_bandwidth_ik()
Imbens-Kalyanaraman (IK) MSE-optimal bandwidth
morie_rdd_bandwidth_rot()
Rule-of-thumb (ROT) bandwidth – Silverman-style on running variable
morie_rdd_bandwidth_sensitivity()
Bandwidth sensitivity sweep
morie_rdd_bias_corrected()
CCT bias-corrected, robust-SE RDD inference
morie_rdd_cattaneo_density()
Cattaneo-Jansson-Ma (2020) local-polynomial density test
morie_rdd_covariate_balance()
Covariate balance at the cutoff
morie_rdd_density_test()
McCrary-style RD density test via rddensity
morie_rdd_discrete()
RDD with discrete running variable
morie_rdd_donut()
Donut-hole RDD
morie_rdd_fuzzy()
Fuzzy RDD treatment effect via instrumented Wald ratio
morie_rdd_geographic()
Geographic / boundary RDD on a signed distance
morie_rdd_kernel_triangular() morie_rdd_kernel_epanechnikov() morie_rdd_kernel_uniform() morie_rdd_kernel_gaussian()
RDD kernel functions
morie_rdd_kink()
Regression kink design – slope discontinuity at the cutoff
morie_rdd_local_polynomial()
Local polynomial regression at user-supplied evaluation points
morie_rdd_local_randinf()
Local-randomisation RDD inference via rdlocrand
morie_rdd_local_randomisation()
Local-randomisation RDD via permutation in a fixed window
morie_rdd_mccrary()
McCrary (2008) density manipulation test
morie_rdd_placebo_cutoff()
Placebo cutoff falsification test
morie_rdd_plot_data()
Binned scatter + global-polynomial data for an RD plot
morie_rdd_power()
RDD power calculation
morie_rdd_power_calc()
Power calculations for RDD designs via rdpower
morie_rdd_sample_size()
RDD sample-size determination
morie_rdd_sharp()
Sharp RDD treatment effect at the cutoff

Matching & weighting

Propensity, Mahalanobis, optimal/genetic matching and IPW families.

morie_matching_abadie_imbens_kernel_cpp
morie_matching_abadie_imbens_kernel_cpp
morie_matching_abadie_imbens_se()
Abadie-Imbens standard error for matching estimators
morie_matching_atc_matched()
ATC from a matched sample
morie_matching_ate_matched()
ATE from a matched / weighted sample
morie_matching_att_matched()
ATT from a matched sample
morie_matching_balance()
Balance diagnostics for matched / weighted samples
morie_matching_balance_table()
Publication-ready balance table
morie_matching_cardinality()
Cardinality matching
morie_matching_cem()
Coarsened Exact Matching (CEM)
morie_matching_cem_strata_cpp
morie_matching_cem_strata_cpp
morie_matching_common_support()
Restrict a sample to the region of common support
morie_matching_doubly_robust()
Doubly-robust ATT combining matching and regression
morie_matching_entropy_balance()
Entropy balancing weights (Hainmueller, 2012)
morie_matching_estimate_propensity()
Estimate propensity scores
morie_matching_euclidean_pairs_cpp
morie_matching_euclidean_pairs_cpp
morie_matching_exact()
Exact matching on discrete covariates
morie_matching_full()
Optimal full matching
morie_matching_genetic()
Genetic matching (Diamond & Sekhon, 2013)
morie_matching_longitudinal()
Longitudinal matching for panel data
morie_matching_love_plot_data()
Love-plot data: pre- vs post-matching balance
morie_matching_mahalanobis()
Mahalanobis distance matching
morie_matching_mahalanobis_pairs_cpp
morie_matching_mahalanobis_pairs_cpp
morie_matching_multi_treatment()
Matching with multiple (> 2) treatment groups
morie_matching_nearest_neighbor()
Nearest-neighbour propensity-score matching
morie_matching_nn_select_cpp
morie_matching_nn_select_cpp
morie_matching_optimal_pair()
Optimal pair matching
morie_matching_overlap()
Propensity-score overlap diagnostics
morie_matching_quality()
Comprehensive matching-quality assessment
morie_matching_rosenbaum_bounds()
Rosenbaum bounds for hidden bias
morie_matching_subclassify()
Subclassification (stratification) on the propensity score
morie_matching_trim_propensity()
Trim propensity scores to a fixed range
morie_matching_variable_ratio()
Variable-ratio matching on propensity score
morie_weight_cbps()
Covariate-balancing propensity score (Imai & Ratkovic 2014)
morie_weight_diagnostic()
Balance diagnostics for a morie_weight object
morie_weight_entropy()
Entropy-balancing weights (Hainmueller 2012)
morie_weight_ow()
Overlap weights (Li, Morgan & Zaslavsky 2018)
morie_weight_ps()
Propensity-score weights (logistic base learner)
morie_weight_stabilized()
Stabilized IPW (Austin 2009 / Robins et al. 2000)
morie_weight_super()
SuperLearner-style ensemble propensity weights
morie_weight_trimming()
Trim extreme weights from a morie_weight object
morie_weighted_logrank()
Weighted log-rank tests (Peto-Peto, Gehan-Wilcoxon, Tarone-Ware)
morie_weightit() print(<morie_weightit>)
Balancing weights by WeightIt's rules, natively
morie_weights_bootstrap()
Bootstrap replicate weights (Rao-Wu rescaling within strata)
morie_weights_brr()
Balanced Repeated Replication (BRR) weights
morie_weights_calibrate_to_totals()
Dispatch helper – calibrate to totals via "raking" or "greg"
morie_weights_combined()
Combined design x nonresponse x post-strat (x trim) pipeline
morie_weights_deff()
Kish design effect (n / ESS)
morie_weights_design()
Design weights from inclusion probabilities
morie_weights_detect_extreme()
Detect extreme weights at +/- k * IQR or by absolute percentile
morie_weights_diagnostics()
Comprehensive weight diagnostics
morie_weights_ess()
Kish effective sample size: \((\sum w_i)^2 / \sum w_i^2\)
morie_weights_fay_brr()
Fay's BRR weights with perturbation coefficient fay_coefficient in [0,1)
morie_weights_greg()
Generalised regression (GREG) calibration
morie_weights_jackknife()
Jackknife replicate weights (JK1 delete-1 or JKn stratified delete-n)
morie_weights_multiframe()
Multi-frame (dual-frame) survey weights (Hartley compositing)
morie_weights_nonresponse()
Non-response adjustment within cells
morie_weights_normalize()
Normalise weights so they sum to n (sample) or N (population)
morie_weights_poststratify()
Post-stratification weight adjustment
morie_weights_propensity_nonresponse()
Propensity-score non-response weights (logistic)
morie_weights_rake()
Raking calibration (iterative proportional fitting)
morie_weights_replicate_variance()
Variance estimation from replicate estimates
morie_weights_sdr()
Successive Difference Replication (SDR) weights
morie_weights_smooth()
Smooth survey weights via shrinkage toward the mean (or log-mean)
morie_weights_totals()
Spatial weights constants
morie_weights_trim()
Trim extreme weights at percentile cutpoints

Sensitivity analysis & fairness

morie_sensitivity_amplification()
Amplification of a sensitivity parameter: one Gamma is a curve of (Lambda, Delta)
morie_sensitivity_evalue()
E-values for the EValue dispatch family (extender)
morie_sensitivity_konfound()
Konfound robustness for a coefficient (native konfound)
morie_sensitivity_omitted_var_bias()
Omitted-variable bias on a fitted model (native sensemakr)
morie_sensitivity_rosenbaum()
Rosenbaum bounds sensitivity analysis
morie_sensitivity_tipping_point()
Tipping point for a single unmeasured confounder (native tipr)
morie_fairness_apply_profile()
Rename a city data.frame onto the canonical audit schema
morie_fairness_average_odds_difference()
Average Odds Difference (mean of TPR and FPR gaps)
morie_fairness_base_rate_bounds()
Sharp bounds on a true base rate from a noisy recorded one
morie_fairness_bias_amplification()
Bias Amplification Score (parity gap x Gini of group rates)
morie_fairness_city_profile()
Construct a city profile (column map onto the canonical audit schema)
morie_fairness_column_map()
Column map for a city profile
morie_fairness_compare_groups()
Can two groups' true base rates be ordered under label noise?
morie_fairness_ctgan_debiaser()
Rebalance a biased tabular dataset by group
morie_fairness_demographic_parity()
Demographic Parity Gap (difference in favourable-outcome rates)
morie_fairness_disparate_impact()
Disparate Impact Ratio (EEOC four-fifths / 80% rule)
morie_fairness_equalized_odds()
Equalized Odds (TPR / FPR gaps across groups)
morie_fairness_gan
Counterfactual fairness via GAN-style generative models
morie_fairness_get_city()
Look up a registered city profile by case-insensitive name
morie_fairness_gini()
Gini coefficient (concentration of a non-negative distribution)
morie_fairness_implied_fpr()
The false positive rate implied by base rate, PPV and FNR
morie_fairness_list_cities()
List registered city profile names
morie_fairness_noisy_or_detection()
Noisy-OR patrol-detection probabilities
morie_fairness_predpol
Predictive-policing disparity audit (port of morie.fairness.predpol)
morie_fairness_predpol_aggregate_areas()
Aggregate per-record predictive-policing data to per-area
morie_fairness_predpol_calibration_audit()
Predicted-vs-realised rank audit by demographic group
morie_fairness_predpol_score_disparity()
Descriptive score-by-group disparity
morie_fairness_predpol_temporal_audit()
Audit how disparity metrics move over time and across cities
morie_fairness_rates()
Group-wise rates from a confusion table
morie_fairness_register_city()
Register a city profile in the process-local registry
morie_fairness_simulate_biased_crime_data()
Synthetic predictive-policing dataset with a known disparity
morie_fairness_simulation
Simulation primitives for the predictive-policing audit subsystem
morie_fairness_spatial_gan()
Learn a 2-D crime/patrol location distribution
morie_fairness_true_rate()
Recover a true base rate when the noise rates are known
morie_fairness_xai
Model-agnostic explainability (XAI) for bias discovery
morie_fairness_xai_ale()
First-order Accumulated Local Effects (Apley & Zhu)
morie_fairness_xai_ceteris_paribus()
Ceteris-paribus profile for one instance
morie_fairness_xai_partial_dependence()
Partial dependence on one feature (Friedman)
morie_fairness_xai_permutation_importance()
Permutation feature importance (model-agnostic)
morie_fairness_xai_shap_values()
Shapley feature attributions for one instance (sampling estimator)

Spatial analysis

Geostatistics, kriging, autocorrelation, and scan statistics.

morie_spatial()
Construct a spatial data object
morie_spatial_2sls()
Spatial two-stage least squares
morie_spatial_classical_mds_cpp
morie_spatial_classical_mds_cpp
morie_spatial_cluster()
Spatial clustering of the coordinates
morie_spatial_coords()
Coordinate matrix of a spatial object
morie_spatial_crs()
CRS of a spatial object (EPSG + WKT2-style label)
morie_spatial_distance()
Distance matrix for a spatial object
morie_spatial_econometrics
Spatial autocorrelation and spatial-econometric estimators
morie_spatial_emirt_theta_update_cpp
morie_spatial_emirt_theta_update_cpp
morie_spatial_krige()
Ordinary kriging predictions at new locations
morie_spatial_lag_model() morie_spatial_error_model()
Maximum-likelihood spatial regression models
morie_spatial_leaflet_spec()
Specification for an interactive (leaflet) map
morie_spatial_models
Maximum-likelihood spatial models, point patterns and local privacy
morie_spatial_moran()
Global Moran's I on a spatial object
morie_spatial_neighbors()
Construct spatial neighbours
morie_spatial_nominate_iterate_cpp
morie_spatial_nominate_iterate_cpp
morie_spatial_omission()
Spatial-lag omission is bias, spatial-error omission is inefficiency
morie_spatial_sample()
Sample points from a spatial object, optionally by local density
morie_spatial_smacof_step_cpp
morie_spatial_smacof_step_cpp
morie_spatial_transform()
Reproject a spatial object between CRS (4326 <-> 3857)
morie_spatial_variogram()
Empirical semivariogram
morie_spatial_variogram_fit()
Fit a variogram model by Gaussian maximum likelihood
morie_spatial_voting_aldrich_mckelvey()
Aldrich-McKelvey scaling
morie_spatial_voting_alpha_nominate()
Alpha-NOMINATE ideal points (Carroll et al. 2013)
morie_spatial_voting_anchoring_vignettes()
Anchoring vignettes for DIF correction
morie_spatial_voting_bayesian_am()
Bayesian Aldrich-McKelvey scaling (Hare et al. 2015)
morie_spatial_voting_bayesian_irt_likelihood()
Bayesian IRT likelihood (deterministic part of CJR machinery)
morie_spatial_voting_bayesian_irt_posterior()
Posterior summaries for a Bayesian IRT chain
morie_spatial_voting_bayesian_mds()
Bayesian metric multidimensional scaling (Bakker and Poole 2013)
morie_spatial_voting_bayesian_unfolding()
Bayesian unfolding (Bakker and Poole 2013)
morie_spatial_voting_blackbox()
Blackbox / Basic Space scaling
morie_spatial_voting_cjr_irt()
Clinton-Jackman-Rivers Bayesian IRT by Gibbs sampling
morie_spatial_voting_classical_mds()
Classical (metric) multidimensional scaling
morie_spatial_voting_cutting_lines()
Cutting-line endpoints for Coombs-mesh plots
morie_spatial_voting_double_centering()
Double-center a distance matrix
morie_spatial_voting_dw_nominate()
DW-NOMINATE dynamic weighted ideal-point estimator
morie_spatial_voting_dynamic_irt()
Dynamic IRT: ideal points that drift by a random walk (Martin and Quinn 2002)
morie_spatial_voting_em_irt()
EM algorithm for binary IRT
morie_spatial_voting_ideal_point_recovery()
Ideal-point recovery from unfolding output
morie_spatial_voting_indscal()
INDSCAL: weighted MDS with individual differences
morie_spatial_voting_mds_fit_stats()
MDS fit statistics (Mardia criterion)
morie_spatial_voting_mlsmu6()
MLSMU6 alternating least-squares unfolding
morie_spatial_voting_nominate_bootstrap()
Parametric bootstrap of NOMINATE standard errors
morie_spatial_voting_nominate_loglik()
NOMINATE log-likelihood and GMP
morie_spatial_voting_nominate_utility()
NOMINATE Gaussian utility
morie_spatial_voting_nominate_vote_prob()
Single NOMINATE vote probability
morie_spatial_voting_nonmetric_mds()
Nonmetric MDS with isotonic regression
morie_spatial_voting_nonparametric_bootstrap()
Nonparametric bootstrap for AM / blackbox scaling positions
morie_spatial_voting_normal_vectors()
Normal-vector projection of an external measure
morie_spatial_voting_optimal_classification()
Optimal Classification scaling
morie_spatial_voting_ordered_oc()
Ordered Optimal Classification for ordinal scales
morie_spatial_voting_ordinal_irt()
Ordinal IRT: the ordinal factor model of Quinn (2004)
morie_spatial_voting_procrustes()
Procrustes rotation
morie_spatial_voting_smacof()
SMACOF stress minimisation
morie_spatial_voting_smacof_unfolding()
SMACOF rectangular unfolding
morie_spatial_voting_unfolding_stress()
Compute unfolding stress
morie_spatial_voting_wordfish()
Wordfish: Poisson IRT for document-term matrices
morie_spatial_weights()
Spatial weights from a neighbour matrix
morie_spatial_wordfish_omega_update_cpp
morie_spatial_wordfish_omega_update_cpp

Time series

morie_ts()
Construct a validated time series
morie_ts_accuracy()
Forecast accuracy metrics
morie_ts_acf()
Ordered autocorrelation / autocovariance of a series
morie_ts_arima()
Fit an ARIMA / SARIMA model
morie_ts_backtest()
Back-test a forecasting configuration on a holdout tail
morie_ts_decompose()
Decompose a seasonal time series
morie_ts_difference()
Difference a series, retaining the information to reverse it
morie_ts_forecast()
Forecast from a fitted time-series model
morie_ts_select()
Select ARIMA orders by information criterion
morie_ts_stationarity()
Test a series for stationarity
morie_ts_trim_forecast()
Trim a forecast to a maximum prediction-interval width
morie_ts_undifference()
Reverse morie_ts_difference()
morie_tsboot()
Native block bootstrap for time series
morie_tsimpute()
Missing-data imputation for time series (ch. 2 pp. 44-52)
morie_tsmixer()
TSMixer time-mixing and feature-mixing, all-MLP
morie_tsne_reduction()
t-SNE for non-linear dimension reduction (R parity)
morie_tsregmat()
Time series recast as a regression problem (ch. 5 p. 118)

Signal processing

Spectral analysis, filters, and biomedical-signal routines.

morie_dsp_acf_from_psd()
Autocorrelation from PSD (Wiener-Khinchin)
morie_dsp_alpha_trimmed_mean()
Alpha-trimmed mean filter
morie_dsp_amplitude_histogram()
Amplitude histogram features
morie_dsp_arc_length()
Signal arc length
morie_dsp_band_power()
Bandpower over [f_low, f_high]
morie_dsp_baseline_correlation()
Baseline-corrected Pearson correlation
morie_dsp_centroidal_time()
Centroidal time
morie_dsp_coherence()
Coherence-squared spectrum
morie_dsp_coherence_spectrum()
Coherence spectrum (alias to morie_dsp_coherence)
morie_dsp_comb()
Comb filter built from cascaded notches
morie_dsp_complex_cepstrum()
Complex cepstrum
morie_dsp_complex_demodulation()
Complex demodulation around a carrier
morie_dsp_crest_factor()
Crest factor (peak / RMS)
morie_dsp_cross_correlation()
Normalised cross-correlation up to a maximum lag
morie_dsp_cross_correlation_cpp
morie_dsp_cross_correlation_cpp
morie_dsp_csd()
Cross-spectral density (Welch)
morie_dsp_cv()
Coefficient of variation
morie_dsp_derivative_detect()
Derivative-based peak detection
morie_dsp_dicrotic_notch()
Dicrotic-notch detection in pulse waves
morie_dsp_ensemble_average()
Ensemble average over fixed-length segments
morie_dsp_entropy_histogram()
Shannon entropy from amplitude histogram
morie_dsp_even_odd()
Even-odd decomposition of a finite signal
morie_dsp_fbm_synthesis()
Fractional Brownian motion synthesis (1/f^beta)
morie_dsp_form_factor()
Form factor (RMS / mean-absolute)
morie_dsp_fractal_dim_psd()
Fractal dimension from log-log PSD slope
morie_dsp_hann_filter()
Hann-windowed smoothing filter
morie_dsp_higuchi_fd()
Higuchi fractal dimension
morie_dsp_hilbert_envelope()
Hilbert envelope
morie_dsp_hjorth()
All three Hjorth parameters
morie_dsp_hjorth_activity()
Hjorth activity (variance)
morie_dsp_hjorth_complexity()
Hjorth complexity
morie_dsp_hjorth_mobility()
Hjorth mobility
morie_dsp_homomorphic()
Homomorphic high-pass filter
morie_dsp_hr_from_rr()
Heart rate from RR intervals (BPM)
morie_dsp_integrated_emg()
Integrated EMG (sum of absolute values)
morie_dsp_katz_fd()
Katz / box-counting fractal dimension
morie_dsp_lms()
LMS adaptive filter (Widrow-Hoff)
morie_dsp_lms_cpp
morie_dsp_lms_cpp
morie_dsp_matched()
Matched filter (time-reversed template correlator)
morie_dsp_mean_abs()
Mean absolute value
morie_dsp_mean_frequency()
Mean frequency from PSD
morie_dsp_median_filter()
Median filter
morie_dsp_median_filter_cpp
morie_dsp_median_filter_cpp
morie_dsp_median_frequency()
Median frequency from PSD
morie_dsp_min_phase()
Minimum-phase correspondent via cepstral folding
morie_dsp_moving_average()
Moving-average filter (boxcar)
morie_dsp_myopulse_rate()
Myopulse percentage rate
morie_dsp_nlms()
NLMS adaptive filter
morie_dsp_nlms_cpp
morie_dsp_nlms_cpp
morie_dsp_notch()
IIR notch filter (single frequency)
morie_dsp_onset_detect()
Energy-onset detection
morie_dsp_pan_tompkins()
Pan-Tompkins QRS detector
morie_dsp_parzen_pdf()
Parzen kernel density estimate
morie_dsp_psd_bartlett()
Bartlett PSD estimate
morie_dsp_psd_periodogram()
Periodogram PSD estimate
morie_dsp_psd_to_db()
Convert PSD to decibels
morie_dsp_psd_welch()
Welch PSD estimate (rmorie native)
morie_dsp_qrs_features()
QRS-style waveform descriptors
morie_dsp_rls()
RLS adaptive filter
morie_dsp_rls_cpp
morie_dsp_rls_cpp
morie_dsp_rms()
Root mean square
morie_dsp_ruler_fd()
Ruler / divider fractal dimension
morie_dsp_shannon_energy()
Shannon-energy envelope
morie_dsp_shape_factor()
Shape factor (mean-absolute / mean-sqrt-absolute-squared)
morie_dsp_slope_sign_changes()
Slope sign changes
morie_dsp_snr()
Signal-to-noise ratio estimate (dB)
morie_dsp_snr_improvement()
SNR improvement attributable to a filter (dB)
morie_dsp_spectral_edge()
Spectral edge frequency (e.g. SEF95)
morie_dsp_spectral_entropy()
Spectral entropy (Shannon, base 2)
morie_dsp_spectral_flatness()
Spectral flatness (Wiener entropy)
morie_dsp_spectral_kurtosis()
Spectral kurtosis from PSD
morie_dsp_spectral_moment()
k-th spectral moment
morie_dsp_spectral_ratio()
Spectral power ratio between two bands
morie_dsp_synchronized_average()
Synchronized average around trigger indices
morie_dsp_t_wave()
T-wave detection by post-QRS argmax search
morie_dsp_teager_energy()
Teager-Kaiser energy operator
morie_dsp_template_match()
Normalised template matching
morie_dsp_threshold_detect()
Threshold-based event detection
morie_dsp_turning_points()
Turning-points stationarity test
morie_dsp_turns_count()
Willison turns count
morie_dsp_variance_ratio()
Variance ratio (x vs. y)
morie_dsp_waveform_length()
Waveform length (total variation)
morie_dsp_waveform_length_norm()
Per-sample (normalised) waveform length
morie_dsp_wiener_filter()
Wiener filter (frequency domain)
morie_dsp_wiener_hopf()
Solve the Wiener-Hopf normal equations
morie_dsp_willison_amplitude()
Willison amplitude
morie_dsp_window()
Window function generator
morie_dsp_zero_crossing()
Zero-crossing rate

Survival analysis

Aftfit() morie_survival_aft()
Accelerated failure time regression
Cif() morie_survival_cif()
Cumulative incidence function under competing risks
Coxsnell() morie_survival_coxsnell()
Cox-Snell residuals from a fitted Cox model
Devresid() morie_survival_deviance()
Deviance residuals from a fitted Cox model
Finegray() morie_survival_finegray()
Fine-Gray subdistribution hazard model
Hazratio() morie_survival_hr()
Hazard ratios with confidence intervals
Landmark() morie_survival_landmark()
Landmark analysis of survival
Ltkm() morie_survival_left_truncated_km()
Kaplan-Meier estimator under left truncation
Martingale() morie_survival_martingale()
Martingale residuals from a fitted Cox model
Paracompare() morie_survival_compare_parametric()
Compare parametric survival families by information criterion
Parasurv() morie_survival_parametric()
Parametric survival fit by maximum likelihood
Rmst() morie_survival_rmst()
Restricted mean survival time
Rmstdiff() morie_survival_rmst_diff()
Difference in restricted mean survival time between two groups
Schoenfeld() morie_survival_schoenfeld()
Schoenfeld residuals and the proportional-hazards test
Turnbull() morie_survival_turnbull()
Turnbull estimator for interval-censored data
morie_concordance_index() morie_survival_concordance()
Harrell's concordance index
morie_cox_ph() morie_cox_partial_loglik() morie_survival_cox()
Cox proportional-hazards model
morie_kaplan_meier() morie_survival_km()
Kaplan-Meier product-limit estimator
morie_logrank_test() morie_survival_logrank()
Log-rank test
morie_nelson_aalen() morie_survival_nelsonaalen()
Nelson-Aalen cumulative hazard
morie_survival
Survival analysis: Kaplan-Meier, Nelson-Aalen, log-rank and Cox
morie_survival_psi()
Kaplan-Meier Z-estimator map

Bayesian methods & distributions

morie_bayes()
Bayes' theorem over a complete hypothesis set
morie_bayes_binomial()
Bayesian inference for a binomial probability
morie_bayes_compare()
Compare posterior means against an external (lm) reference
morie_bayes_continue()
Continue an MCMC run from its final state
morie_bayes_cpi_genomic()
BayesC-pi spike-and-slab variable selection (short Gibbs)
morie_bayes_density()
Posterior density plot for one parameter (BS6.3)
morie_bayes_diagnostics()
All convergence diagnostics for a fit (details of each checker used)
morie_bayes_ess()
Effective sample size (per parameter, autocorrelation-based)
morie_bayes_factor_savage_dickey()
Savage-Dickey Bayes factor (Verdinelli & Wasserman 1995, bfsd)
morie_bayes_geweke()
Geweke convergence diagnostic (z-score comparing chain segments)
morie_bayes_lm()
Fit a Bayesian linear regression by random-walk Metropolis
morie_bayes_plot()
Default MCMC plot (trace, density, or both)
morie_bayes_rhat()
Gelman-Rubin R-hat for a set of MCMC chains
morie_bayes_ridge_gibbs()
BayesA via short Gibbs sampler (Meuwissen-Hayes-Goddard 2001)
morie_bayes_risk_dpi()
Post-processing cannot lower the best squared-error risk
morie_bayesian_horseshoe()
Horseshoe linear regression (Makalic & Schmidt 2016 Gibbs sampler)
morie_bayesian_lasso_full()
Bayesian LASSO (Park & Casella 2008 short Gibbs)
morie_brr_gibbs()
Bayesian regression samplers
morie_bayesian_ridge_regression()
Bayesian ridge regression (RR-BLUP closed form)
morie_grm() morie_gblup() morie_gblup_model() morie_snp_blup() morie_bayes_gblup()
Genomic prediction models
morie_kernel_matrix() morie_rkhs_fit() morie_rkhs_predict() morie_rkhs_mixed_equations() morie_arccos_kernel() morie_bayesian_kernel_blup() morie_kernel_blup_gxe() morie_kernel_blup_replicated() morie_kernel_eigen_design() morie_nystrom() morie_sparse_kernel_design()
Kernel and RKHS methods
morie_ghosal_adaptation()
Adaptive contraction rates over a smoothness grid
morie_ghosal_bernstein_von_mises()
BvM diagnostic for the mean functional under a DP prior
morie_ghosal_contraction_rate()
Minimax posterior-contraction rate
morie_ghosal_dirichlet_posterior()
Dirichlet-process posterior (conjugate update)
morie_ghosal_dpmixture_density()
DP mixture density estimate (Neal 2000 algorithm 3)
morie_ghosal_empirical_bayes()
Empirical-Bayes alpha MLE for a DP, given the observed K_n
morie_ghosal_gp_matern()
GP posterior mean with Matern kernel
morie_ghosal_gp_squared_exponential()
GP posterior mean with squared-exponential kernel
morie_ghosal_hierarchical_bayes()
Escobar-West augmentation for alpha given K_n with a Gamma(a, b) hyperprior
morie_ghosal_log_density()
Log-spline density estimator (Stone 1990, Ghosal Ch 8)
morie_ghosal_moment_matching()
Posterior mean / variance of G(A) for DP(alpha, G0) and A = (A_lower, A_upper]
morie_ghosal_neutral_right()
Neutral-to-the-right posterior survival (Doksum 1974)
morie_ghosal_np_classification()
Probit-GP classifier (Laplace approximation)
morie_ghosal_np_regression()
GP nonparametric regression
morie_ghosal_np_testing()
Polya-tree Bayes factor for H0: F = N(loc, scale^2)
morie_ghosal_posterior_consistency()
Schwartz posterior-consistency diagnostic (Bayesian bootstrap)
morie_ghosal_sieve_prior()
Bernstein-polynomial sieve density estimator (Petrone 1999)
morie_ghosal_stick_breaking_trunc()
Truncated stick-breaking representation of DP(alpha, G0)
morie_ghosal_survival_beta_process()
Beta-process posterior survival (Hjort 1990)
morie_ghosal_wavelet_prior()
Haar-wavelet spike-and-slab BayesThresh estimator (Abramovich 1998)
morie_dist_cdf()
Cumulative distribution function at points
morie_dist_integrate()
Integrate a function against a distribution's support, with checks
morie_dist_moment()
A moment of a distribution, analytically or by integration
morie_dist_pdf()
Density / mass of a distribution at points
morie_dist_quantile()
Quantile function
morie_dist_sum()
Sum a discrete distribution's mass (or a moment) with convergence check
morie_distribution()
Construct a general probability-distribution object

Machine learning

morie_ml_apply_smote()
Apply SMOTE oversampling to balance a binary outcome
morie_ml_assess()
Assess model performance
morie_ml_bake()
Apply (or reverse) a prepped recipe to data
morie_ml_center()
Center a numeric vector to a target mean
morie_ml_eval_robustness()
Evaluate Random Forest robustness
morie_ml_impute()
Mean/median/constant imputation of a numeric vector
morie_ml_load()
Load a trained model from disk
morie_ml_model()
Specify a supervised model without fitting it
morie_ml_prep()
Estimate recipe parameters from training data
morie_ml_recipe()
Specify a preprocessing recipe
morie_ml_resample()
Train + assess across resampling folds and combine the results
morie_ml_save()
Save a trained model to disk
morie_ml_scale()
Scale a numeric vector by a target standard deviation
morie_ml_split()
Partition data into train / test / validation sets
morie_ml_train()
Train a specified model
morie_ml_train_time()
Estimate time to train a model
morie_ml_tune()
Tune hyperparameters by cross-validated grid search
morie_mlogit_probs()
Multinomial probabilities and conditional odds ratios

Survey methods

morie_survey_calibrate()
Raking calibration to known marginal totals (iterative proportional fitting)
morie_survey_categorical()
Survey-weighted categorical estimates
morie_survey_complex_glm()
Complex-survey GLM in one call
morie_survey_design()
Construct a survey design object
morie_survey_glm()
Survey-weighted GLM with design-based SEs
morie_survey_hajek_mean()
Hajek (ratio) estimator of a population mean
morie_survey_ht_total()
Horvitz-Thompson estimator of a population total
morie_survey_mean()
Survey-weighted mean with its design-based standard error
morie_survey_poststratify()
Post-stratification weights (sample-to-population alignment)
morie_survey_ratio()
Ratio estimator of a population total using known X_pop
morie_survey_subpop()
Subpopulation (domain) mean with Woodruff linearised SE
morie_survey_variances()
Design-based vs model-based variance identities (chapter 26)

Causal DAGs

DAG construction, backdoor identification, estimation, and refutation.

morie_dag()
Build a causal DAG
morie_dag_estimate()
Estimate the identified effect from data
morie_dag_identify()
Identify the causal effect in a DAG (backdoor criterion)
morie_dag_refute()
Refute an estimated causal effect

Applied study: OTIS (Ontario carceral data)

morie_otis_aipw_ate()
Doubly-robust (AIPW) ATE on OTIS data via cross-fitted nuisances
morie_otis_aipw_superlearner()
SuperLearner-stacked AIPW on OTIS data (native)
morie_otis_all_analyses()
Run the full OTIS analysis capsule
morie_otis_all_analyze
Comprehensive per-dataset analyses for ALL 28 OTIS public-release files
morie_otis_analyze_a01()
OTIS a01 high-level causal analysis (MatchIt + IRM-DML)
morie_otis_analyze_a01_ruhela_alt_age() morie_otis_analyze_a01_mrm_alt_age()
a01 alt-T Ruhela: Age 50+ -> vm count
morie_otis_analyze_a01_ruhela_alt_gender() morie_otis_analyze_a01_mrm_alt_gender()
a01 alt-T Ruhela: Female -> vm count
morie_otis_analyze_a01_ruhela_alt_toronto() morie_otis_analyze_a01_mrm_alt_toronto()
a01 alt-T Ruhela: Toronto region -> vm count
morie_otis_analyze_a01_ruhela_formulations() morie_otis_analyze_a01_dlrm() morie_otis_analyze_a01_mrm()
OTIS a01 Ruhela formulations (full DLRM)
morie_otis_analyze_a01_ruhela_per_year() morie_otis_analyze_a01_mrm_per_year()
Per-year full-DLRM on the a01 canonical formulation
morie_otis_analyze_a01_ruhela_subgroup_female() morie_otis_analyze_a01_mrm_subgroup_female()
a01 subgroup Ruhela: Female-only cell frame
morie_otis_analyze_a01_ruhela_subgroup_male() morie_otis_analyze_a01_mrm_subgroup_male()
a01 subgroup Ruhela: Male-only cell frame
morie_otis_analyze_a01_with_csi_context()
OTIS a01 causal pipeline + Toronto Crime Severity Index context
morie_otis_analyze_all()
Run every OTIS analyzer against a named list of datasets
morie_otis_analyze_b01()
Person-level segregation-placement analysis (b01)
morie_otis_analyze_b01_ruhela_alt_age() morie_otis_analyze_b01_mrm_alt_age()
b01 alt-T Ruhela: Age 50+ -> vm count
morie_otis_analyze_b01_ruhela_alt_gender() morie_otis_analyze_b01_mrm_alt_gender()
b01 alt-T Ruhela: Female -> vm count
morie_otis_analyze_b01_ruhela_alt_toronto() morie_otis_analyze_b01_mrm_alt_toronto()
b01 alt-T Ruhela: Toronto region -> vm count
morie_otis_analyze_b01_ruhela_formulations() morie_otis_analyze_b01_dlrm() morie_otis_analyze_b01_mrm()
OTIS b01 Ruhela formulations (full DLRM)
morie_otis_analyze_b01_ruhela_per_year() morie_otis_analyze_b01_mrm_per_year()
Per-year full-DLRM on the b01 canonical formulation
morie_otis_analyze_b01_ruhela_subgroup_female() morie_otis_analyze_b01_mrm_subgroup_female()
b01 subgroup Ruhela: Female-only cell frame
morie_otis_analyze_b01_ruhela_subgroup_male() morie_otis_analyze_b01_mrm_subgroup_male()
b01 subgroup Ruhela: Male-only cell frame
morie_otis_analyze_b02()
Aggregate segregation days per person per year (b02)
morie_otis_analyze_b02_ruhela_alt_age() morie_otis_analyze_b02_mrm_alt_age()
b02 alt-T Ruhela: Age 50+ -> seg-day count
morie_otis_analyze_b02_ruhela_alt_region() morie_otis_analyze_b02_mrm_alt_region()
b02 alt-T Ruhela: Toronto region -> seg-day count
morie_otis_analyze_b02_ruhela_formulations() morie_otis_analyze_b02_dlrm() morie_otis_analyze_b02_mrm()
OTIS b02 Ruhela formulations: T=Female -> seg-day count
morie_otis_analyze_b03()
Segregation placements by alert x institution (b03)
morie_otis_analyze_b03_ruhela_aggregate() morie_otis_analyze_b03_mrm_aggregate()
b03 aggregate Ruhela: Alert presence -> seg placements
morie_otis_analyze_b04()
Placement durations by region & gender (b04)
morie_otis_analyze_b04_ruhela_aggregate() morie_otis_analyze_b04_mrm_aggregate()
b04 aggregate Ruhela: Female -> median seg duration
morie_otis_analyze_b05()
Distribution of placements by binned duration (b05)
morie_otis_analyze_b05_mandela_classification()
Mandela-RF on b05 – per-placement Mandela classification by year
morie_otis_analyze_b05_ruhela_aggregate()
b05 aggregate Ruhela: schema-no-demographic guard
morie_otis_analyze_b06()
Reasons for placement x institution x gender (b06)
morie_otis_analyze_b06_ruhela_aggregate() morie_otis_analyze_b06_mrm_aggregate()
b06 aggregate Ruhela: Disciplinary reason -> seg placements
morie_otis_analyze_b07()
Alerts x gender (b07)
morie_otis_analyze_b07_ruhela_aggregate() morie_otis_analyze_b07_mrm_aggregate()
b07 aggregate Ruhela (pivot to long): With-alert -> seg placements
morie_otis_analyze_b08()
Durations by institution & gender (b08)
morie_otis_analyze_b08_ruhela_aggregate() morie_otis_analyze_b08_mrm_aggregate()
b08 aggregate Ruhela: Female -> median seg duration (institution-clustered)
morie_otis_analyze_b09()
Individuals by number of placements x gender (b09)
morie_otis_analyze_b09_ruhela_aggregate() morie_otis_analyze_b09_mrm_aggregate()
b09 aggregate Ruhela: Female -> individuals in segregation
morie_otis_analyze_c01()
Total individuals x custody/RC/seg x gender (c01)
morie_otis_analyze_c01_ruhela_aggregate() morie_otis_analyze_c01_mrm_aggregate()
c01 aggregate Ruhela: Female -> RC count
morie_otis_analyze_c01_ruhela_aggregate_region_cluster() morie_otis_analyze_c01_mrm_aggregate_region_cluster()
c01 region-cluster variant (year-clustered GEE)
morie_otis_analyze_c02()
Individuals in RC/seg by institution (c02)
morie_otis_analyze_c02_ruhela_aggregate() morie_otis_analyze_c02_mrm_aggregate()
c02 aggregate Ruhela: Female -> RC (institution GEE)
morie_otis_analyze_c03()
Individuals x race x gender (c03)
morie_otis_analyze_c03_ruhela_aggregate() morie_otis_analyze_c03_mrm_aggregate()
c03 aggregate Ruhela: Indigenous -> RC
morie_otis_analyze_c04()
Individuals in RC/seg by race x region (c04)
morie_otis_analyze_c04_ruhela_aggregate() morie_otis_analyze_c04_mrm_aggregate()
c04 aggregate Ruhela: Indigenous -> RC (by region)
morie_otis_analyze_c04_ruhela_aggregate_region_cluster() morie_otis_analyze_c04_mrm_aggregate_region_cluster()
c04 region-cluster variant
morie_otis_analyze_c05()
Individuals in RC/seg by religion x region (c05)
morie_otis_analyze_c05_ruhela_aggregate() morie_otis_analyze_c05_mrm_aggregate()
c05 aggregate Ruhela: non-majority religion -> RC
morie_otis_analyze_c06()
Individuals in RC/seg by age category x region (c06)
morie_otis_analyze_c06_ruhela_aggregate() morie_otis_analyze_c06_mrm_aggregate()
c06 aggregate Ruhela: Age 50+ -> RC
morie_otis_analyze_c07()
Individuals x alerts x gender (c07)
morie_otis_analyze_c07_ruhela_aggregate() morie_otis_analyze_c07_mrm_aggregate()
c07 aggregate Ruhela: Alert presence x Gender -> RC
morie_otis_analyze_c08()
Individuals by religion x gender (c08)
morie_otis_analyze_c08_ruhela_aggregate() morie_otis_analyze_c08_mrm_aggregate()
c08 aggregate Ruhela: non-majority religion x gender -> RC
morie_otis_analyze_c09()
Individuals by age category x gender (c09)
morie_otis_analyze_c09_ruhela_aggregate() morie_otis_analyze_c09_mrm_aggregate()
c09 aggregate Ruhela: Age 50+ x gender -> RC
morie_otis_analyze_c10()
RC/seg aggregate durations by institution (c10)
morie_otis_analyze_c10_ruhela_aggregate() morie_otis_analyze_c10_mrm_aggregate()
c10 aggregate Ruhela: Female -> median RC days (institution GEE)
morie_otis_analyze_c11()
Individuals by aggregate-duration bin (c11)
morie_otis_analyze_c11_mandela_classification()
Mandela-RF on c11 – per-individual Mandela classification by year
morie_otis_analyze_c11_ruhela_aggregate() morie_otis_analyze_c11_mrm_aggregate()
c11 aggregate Ruhela: long-duration bin (>=16 days) -> RC
morie_otis_analyze_c12()
RC/seg aggregate durations by region & gender (c12)
morie_otis_analyze_c12_ruhela_aggregate() morie_otis_analyze_c12_mrm_aggregate()
c12 aggregate Ruhela: Female -> median RC days (by region)
morie_otis_analyze_c_chi2()
MRM chi-square family on c-series
morie_otis_analyze_d01()
Person-level custodial deaths (d01)
morie_otis_analyze_d02()
Custodial deaths by gender (d02)
morie_otis_analyze_d02_ruhela_aggregate() morie_otis_analyze_d02_mrm_aggregate()
d02 aggregate Ruhela: Female -> custodial deaths
morie_otis_analyze_d03()
Custodial deaths by race (d03)
morie_otis_analyze_d03_ruhela_aggregate() morie_otis_analyze_d03_mrm_aggregate()
d03 aggregate Ruhela: Indigenous -> custodial deaths
morie_otis_analyze_d04()
Custodial deaths by religion (d04)
morie_otis_analyze_d04_ruhela_aggregate() morie_otis_analyze_d04_mrm_aggregate()
d04 aggregate Ruhela: non-majority religion -> custodial deaths
morie_otis_analyze_d05()
Custodial deaths by age category (d05)
morie_otis_analyze_d05_ruhela_aggregate() morie_otis_analyze_d05_mrm_aggregate()
d05 aggregate Ruhela: Age 50+ -> custodial deaths
morie_otis_analyze_d06()
Custodial deaths by alert x medical cause (d06)
morie_otis_analyze_d07()
Custodial deaths by alert x housing unit (d07)
morie_otis_analyze_d_chi2()
MRM chi-square family on d-series
morie_otis_analyze_otis_mandela_provincial_vs_federal()
Mandela-RF cross-comparison: Ontario provincial vs federal SIU
morie_otis_analyze_ruhela_grid()
Aggregate Ruhela grid: one-page IRR comparison across analyzers
morie_otis_analyze_ruhela_master()
Paper-ready master report – every Ruhela formulation in one result
morie_otis_analyze_ruhela_per_year()
Per-fiscal-year full-DLRM Ruhela formulation driver
morie_otis_analyzers()
Registry of dataset-id -> analyzer
morie_otis_astcmb()
Alert-state combination encoding (8 combos -> complexity index)
morie_otis_atc()
Doubly robust average treatment effect on the controls (ATC)
morie_otis_balance()
Covariate balance before and after weighting or matching
morie_otis_causal_grid()
Run IPW / AIPW / IRM-DML on the three canonical (T, Y) pairs
morie_otis_churn
Goffmanian institutional-churn analyses on OTIS
morie_otis_churn_analyze_all()
Run all 11 OTIS-churn analyses
morie_otis_classify_mandela_combo()
Mandela alert-state classifier for an OTIS placement row
morie_otis_disciplinary_medical_overlap()
Disciplinary x medical-protection overlap
morie_otis_embedding_distribution()
Total-days embedding distribution (lognormal vs Pareto vs exp)
morie_otis_figures()
Export the OTIS restrictive-confinement figures
morie_otis_gcomputation()
Parametric g-computation of the ATE on OTIS data
morie_otis_intra_year_transition_matrix()
Intra-year region-to-region transition matrix
morie_otis_ipw_ate()
Hajek-stabilised IPW estimator of the ATE on OTIS data
morie_otis_irm_dml()
Interactive Regression Model DML on OTIS data (ATE, ATTE, ATC)
morie_otis_irr_glmm_vm()
Poisson + Negative-Binomial IRR for volatility ~ alert complexity
morie_otis_load()
Load the canonical OTIS CSV
morie_otis_make_pair_a()
Pair (a): MentalHealth_Alert -> SuicideRisk_Alert (binary -> binary)
morie_otis_make_pair_alert_to_volatility_a01()
a01-aware wrapper for the Ruhela alert -> volatility builder
morie_otis_make_pair_alert_to_volatility_all()
Run both Ruhela and Naive alert -> volatility builders
morie_otis_make_pair_alert_to_volatility_naive()
Naive (max-simultaneous-flags + binary vm) alert -> volatility builder
morie_otis_make_pair_alert_to_volatility_ruhela()
Ruhela's primary alert-complexity -> regional-volatility builder
morie_otis_make_pair_b()
Pair (b): HighAlertComplexity -> AnyReadmission
morie_otis_make_pair_c()
Pair (c): RegionalVolatility -> SegregationDays
morie_otis_mortification_cooccurrence()
Mortification co-occurrence (concurrent alerts)
morie_otis_otdesc()
Full OTIS descriptive statistics suite
morie_otis_otdml()
Cross-fitted partially linear DML (ATE/ATT) on OTIS
morie_otis_path_complexity_gini()
Path complexity Gini by (year, region)
morie_otis_per_year_irm_dml()
IRM-DML (or the whole estimator battery) fitted separately by year
morie_otis_pipeline
OTIS analysis pipeline (RichResult-style driver)
morie_otis_plr()
Partially Linear Regression DML on OTIS data (native)
morie_otis_regional_placement() morie_otis_alert_state_combo() morie_otis_volatility() morie_otis_rc_trends() morie_otis_descriptives() morie_otis_dml()
Ontario Restrictive Confinement (OTIS) primitive analyses
morie_otis_psm()
Propensity-score 1:k NN matching with caliper on OTIS data (native)
morie_otis_psm_subclass()
Propensity-score subclassification ATE on OTIS data (native)
morie_otis_rctrnd()
Restrictive-confinement trends over time by region
morie_otis_regC_demog_contingency()
Multi-region path x Gender / Age contingency
morie_otis_region_alert_state_richness()
Region x alert state richness
morie_otis_repeat_placement_concentration()
Repeat-placement concentration (Goffmanian cyclical-inmate)
morie_otis_rplace()
Regional placement matrix by age group
morie_otis_tps_analyze_all()
Run all OTIS-TPS overlay analyses
morie_otis_tps_composite_overlay()
Composite overlay (alias for the YoY correlation)
morie_otis_tps_overlay
Cross-link OTIS (Ontario corrections) with TPS (Toronto police) data
morie_otis_tps_per_region_rollup()
OTIS seg/RC totals per region x year (Toronto row flagged for TPS-overlay use)
morie_otis_tps_yoy_correlation()
Year-over-year correlation between OTIS Toronto-region segregation placements and TPS incident counts (per category)
morie_otis_volat()
Regional volatility / placement movement
morie_otis_within_year_placement_count()
Within-year placement-count distribution
morie_otis_within_year_region_diversity()
Within-year region diversity

Applied study: TPS (Toronto Police Service)

morie_tps_add_hood_140_from_158()
Add an equivalent HOOD_140 column to a HOOD_158-keyed data.frame
morie_tps_add_hood_158_from_140()
Add an equivalent HOOD_158 column to a HOOD_140-keyed data.frame
morie_tps_aggregate_158_to_140()
Aggregate per-158 counts to per-140 counts (EXACT for pure cake-cuts)
morie_tps_analyze
RichResult-emitting analyses for the 13 TPS crime datasets
morie_tps_analyze_all()
Run the full TPS analysis capsule across many TPS data.frames
morie_tps_analyze_assault() morie_tps_analyze_autotheft() morie_tps_analyze_bicycletheft() morie_tps_analyze_breakandenter() morie_tps_analyze_communitysafetyindicators() morie_tps_analyze_hatecrimes() morie_tps_analyze_homicides() morie_tps_analyze_intimatepartnerandfamilyviolence() morie_tps_analyze_neighbourhoodcrimerates() morie_tps_analyze_robbery() morie_tps_analyze_shootingandfirearmdiscarges() morie_tps_analyze_theftfrommovingvehicle() morie_tps_analyze_theftover()
Convenience alias: full TPS capsule on the Assault dataset
morie_tps_analyze_csi_from_dataframes()
Toronto CSI per-year + per-ward from a named list of TPS data.frames
morie_tps_analyze_one()
Run the standard TPS analysis capsule on one data.frame
morie_tps_arima_forecast()
ARIMA(1,1,1) monthly-count forecast
morie_tps_assert_hood_version()
Assert the HOOD_* schema version of a TPS data.frame
morie_tps_available_formats()
List of formats this build can actually load
morie_tps_bivariate_moran()
Bivariate Moran's I between two attributes at the same polygons
morie_tps_bivariate_morans_i()
Bivariate Moran's I between two TPS categories
morie_tps_category_correlation_matrix()
Pearson correlation across TPS categories' per-hood counts
morie_tps_changepoint_detection()
Pettitt-style change-point on yearly incident counts
morie_tps_compare_hawkes_kernels()
Compare Hawkes models across kernel x baseline combinations
morie_tps_composite_index()
Composite per-neighbourhood crime-risk index across TPS categories
morie_tps_crime_compare()
Compare counts and trends across multiple TPS categories
morie_tps_criminal_network_graph()
Premise x neighbourhood co-occurrence network
morie_tps_csi_per_neighbourhood()
CSI per neighbourhood (HOOD_158)
morie_tps_csi_per_year()
Toronto CSI per fiscal year from per-category counts
morie_tps_csi_weight()
Return the CSI weight for a TPS open-data category
morie_tps_data_dir()
Default project data directory for TPS open data
morie_tps_dbscan_clusters()
DBSCAN density clusters on lat/long
morie_tps_disaggregate_140_to_158()
Disaggregate per-140 counts to per-158 counts (uniform-density)
morie_tps_district_for_centroid()
Return the pre-1998 borough name for a (lat, lon) centroid
morie_tps_fetch_category()
Fetch one TPS category as a CSV, paging until exhausted
morie_tps_fetch_dataframe()
Fetch a TPS category and return it as a data.frame
morie_tps_figures()
Export the TPS stochastic diagnostic figures
morie_tps_fokker_planck_grid()
1-D Fokker-Planck density evolution under OU drift+diffusion
morie_tps_getis_ord_g_star()
Local Getis-Ord Gi* statistic per neighbourhood
morie_tps_gini_concentration()
Gini coefficient of a numeric vector
morie_tps_hawkes_advanced
Non-stationary Hawkes with non-exponential kernels (R port)
morie_tps_hawkes_advanced_fit()
Fit a single (kernel, baseline) Hawkes specification
morie_tps_hawkes_markovian_vs_nonmarkovian()
Focused 2x2 Markovian vs non-Markovian Hawkes comparison
morie_tps_hawkes_temporal_fit()
Temporal exponential-kernel Hawkes fit
morie_tps_inspection_game_phase()
Helbing-Szolnoki inspection-game phase diagram
morie_tps_kde_density()
2-D kernel density estimate of geocoded incidents
morie_tps_langevin_simulate()
Euler-Maruyama Ornstein-Uhlenbeck simulation
morie_tps_layer_urls() MORIE_TPS_LAYER_URLS
TPS ArcGIS layer URLs known to MORIE
morie_tps_levy_flight_alpha()
Levy-flight tail exponent on consecutive-incident steps
morie_tps_list_categories()
List TPS categories known to the fetcher
morie_tps_list_datasets()
List all TPS datasets as a data.frame
morie_tps_list_formats()
Map TPS format name -> path of the file that would be loaded
morie_tps_load()
Load TPS dataset name in the given format
morie_tps_load_dataset()
Load one TPS dataset by category name (CSV thin path)
morie_tps_load_tps()
Load a TPS hub layer (incident category or aggregate layer)
morie_tps_load_tps_dataset()
Load a TPS incident dataset for the statistical-physics suite
morie_tps_local_morans_i()
LISA – local Moran's Ii per neighbourhood
morie_tps_lotka_volterra_police_crime()
Lotka-Volterra predator-prey on yearly crime counts
morie_tps_moran_sweep_heatmap()
Sweep polygon Moran's I across (category x year)
morie_tps_morans_i_neighbourhood()
Global Moran's I on neighbourhood-level incident counts
morie_tps_neighbourhood_concentration()
How concentrated is crime across Toronto's 158 neighbourhoods?
morie_tps_offence_summary()
Offence-distribution rollup for a TPS crime data.frame
morie_tps_polygon_morans_i()
Polygon-aware Moran's I on a value column
morie_tps_pretty_label()
Convert a SQL-style column name to a prose label
morie_tps_project_xy()
Project (lat, lon) to rotated planar kilometres
morie_tps_psdp_layers()
List the TPS PSDP layers wrapped by morie
morie_tps_render
Toronto Police Service map rendering (R-side)
morie_tps_render_choropleth()
Polygon choropleth map for Toronto (158 wards)
morie_tps_render_dbscan()
DBSCAN cluster figure on TPS-projected points
morie_tps_render_district_proportional()
District-level proportional-symbol map
morie_tps_render_points()
Render a TPS point-pattern map (incident dots, optional DBSCAN)
morie_tps_render_quad()
Four-panel composite of TPS rendering primitives
morie_tps_render_satscan_panel()
SaTScan-style spatial scan panel
morie_tps_render_yearly_grid()
Small-multiples panel of per-year TPS choropleths
morie_tps_resolve_hood_col()
Resolve which HOOD_* column to use on a TPS crime data.frame
morie_tps_ripley_k()
Ripley's K function at multiple radii
morie_tps_sarima_forecast()
Seasonal ARIMA forecast on monthly incident counts
morie_tps_sdb_reaction_diffusion()
Short-D'Orsogna-Brantingham 2008 hot-spot PDE
morie_tps_sdb_turing_demo()
Canonical Short-D'Orsogna-Brantingham Turing-pattern demo
morie_tps_seasonal_pattern()
Seasonal / cyclic incident-time patterns
morie_tps_spatial_summary()
Spatial rollup for a TPS crime data.frame
morie_tps_statphysics
Statistical physics of crime for TPS data
morie_tps_statphysics_analyze_all()
Run all four statistical-physics analyses on a list of categories
morie_tps_stochastic
Stochastic-physics-of-crime analyses for TPS data
morie_tps_temporal
Temporal analyses for TPS crime data
morie_tps_temporal_summary()
Temporal rollup for a TPS crime data.frame
morie_tps_urban_scaling_beta()
Bettencourt urban-scaling exponent across the 158 Toronto wards
morie_tps_use_of_force() morie_tpsuof()
TPS Use-of-Force rate + type distribution
morie_tps_year_over_year_trend()
Year-over-year linear trend on incident counts
morie_tps_year_to_hood_version()
Recommended HOOD_* schema version for a given OCC_YEAR
morie_tps_yoy_panel()
Side-by-side year-over-year panel across TPS categories

Applied study: SIU (Special Investigations Unit audit)

morie_siu_all_analyses()
Run every SIU descriptive analysis in this module
morie_siu_analyze
SIU descriptive analyses (R port of morie.siu.analyze)
morie_siu_anomaly_check()
Per-field anomaly check: does the parser's extraction match the HTML?
morie_siu_audit_case()
Audit one SIU case end-to-end: parser output + raw HTML
morie_siu_audit_columns()
Per-column accuracy audit: estimate every SIU column's correctness
morie_siu_audit_panel()
Mixture-of-Agents audit panel for one SIU report (native, any model)
morie_siu_by_police_service()
SIU cases by police service
morie_siu_by_year()
SIU cases by year
morie_siu_cache_path()
Cache-path helper for the lightweight SIU scraper
morie_siu_case_counts()
SIU per-case team-size distribution
morie_siu_charges_by_year_chi2()
Chi-square: charges-recommended independent of year?
morie_siu_classify_mandela()
Apply the Sprott-Doob Mandela-Rules classifier to one SIU stay
morie_siu_cli()
SIU command-line front end inside R
morie_siu_compare()
Field-by-field SIU comparison against a user-supplied external table
morie_siu_decision_timing()
SIU decision-timing distributions
morie_siu_demographics()
Affected-person demographics
morie_siu_index_url()
Lightweight Ontario SIU Director's Reports scraper (R-native)
morie_siu_fetch_cases()
Scrape Ontario SIU Director's Reports into a tidy CSV
morie_siu_fetch_dataframe()
Scrape Ontario SIU Director's Reports and return a data frame
morie_siu_index()
SIU drid ? case_number ? language index
morie_siu_llm_extract()
Extract SIU report fields with an LLM (Gemini or Claude)
morie_siu_mental_health_race_indicators()
Mental-health / race keyword indicators
morie_siu_panel()
Run the Mixture-of-Agents reading panel on SIU reports
morie_siu_parse_html()
Parse a SIU director's-report HTML page (pure-R)
morie_siu_parse_news_html()
Parse a SIU news-release HTML page (pure-R)
morie_siu_parse_report() morie_siu_parse_reports()
Parse one SIU director's report into the full 16-field schema
morie_siu_parser
Pure-R SIU director's-report parser (port of morie.siu._parser)
morie_siu_record_correction()
Record a verified correction to the SIU parser's output
morie_siu_refresh_manifest()
Rebuild the Ontario SIU DRID manifest by probing the live site
morie_siu_reports()
SIU director's-reports corpus: reviewed data first, fetch only what's new
morie_siu_resolve_so()
Resolve a subject-official count: verified corpus first, rules second
morie_siu_sanity_check()
Row-level sanity check on a parsed SIU table (regex-only, no LLM)
morie_siu_schema() morie_siu_html_to_text() morie_siu_to_iso_date() morie_siu_strip_boilerplate() morie_siu_report_url() morie_siu_fetch_report()
SIU schema, text, dates and report fetch (bricklayer or native core)
morie_siu_sprott_doob_feb2021()
Comprehensive replication of Sprott & Doob (Feb 2021)
morie_siu_sprott_doob_iftene_table1()
Sprott-Doob-Iftene (May 2021) Table 1: IEDM-reviewed population
morie_siu_sprott_doob_iftene_table10()
Sprott-Doob-Iftene (May 2021) Table 10: per-IEDM decision variance
morie_siu_sprott_doob_iftene_table15()
Sprott-Doob-Iftene (May 2021) Table 15: long-stay no-IEDM cases
morie_siu_sprott_doob_iftene_table9()
Sprott-Doob-Iftene (May 2021) Table 9: IEDM review outcomes
morie_siu_sprott_doob_table11()
Sprott-Doob (Feb 2021) Table 11: Region x stay length
morie_siu_sprott_doob_table12()
Sprott-Doob (Feb 2021) Table 12: regional over-/under-representation
morie_siu_sprott_doob_table13()
Sprott-Doob (Feb 2021) Table 13: regional SIU person-stay rates
morie_siu_sprott_doob_table15()
Sprott-Doob (Feb 2021) Table 15: Region x MH-flag
morie_siu_sprott_doob_table19()
Sprott-Doob (Feb 2021) Table 19: Mandela-Rules classification
morie_siu_sprott_doob_table22()
Sprott-Doob (Feb 2021) Table 22: Region x Mandela groups
morie_siu_sprott_doob_table23()
Sprott-Doob (Feb 2021) Table 23: regional torture/solitary rates
morie_siu_sprott_doob_table4()
Sprott-Doob (Feb 2021) Table 4: length-of-stay distribution
morie_siu_translate() morie_siu_translate_fr_to_en()
Translate SIU report text into any target language via local LLM
morie_siu_verify_chi2()
Recompute Pearson chi-square from a 2D contingency table
morie_siu_verify_published_chi_squares()
Verify every published chi-square against its transcribed cells
morie_siuiap_cite()
Build a citation string for an SIU IAP / CRIMSL / affidavit entry
morie_siuiap_panel_summary()
Human-readable summary of the SIU IAP panel

Applied study: ARSAU

morie_arsau_analyze_aggregate_summary()
Analysis of the ARSAU aggregate-summary-by-year file (2020-2022)
morie_arsau_analyze_detailed_dataset()
Wide-format analysis of the 2020-2022 detailed-incident dataset
morie_arsau_analyze_individual_records()
End-to-end analysis of the ARSAU individual_records CSV for one year
morie_arsau_analyze_main_records()
End-to-end analysis of the ARSAU main_records CSV for one year
morie_arsau_analyze_probe_cycle_records()
Analysis of ARSAU probe_cycle_records (CEW telemetry)
morie_arsau_analyze_weapon_records()
Analysis of ARSAU weapon_records
morie_arsau_available_datasets()
List ARSAU dataset kinds, optionally restricted to one year
morie_arsau_available_years()
List ARSAU year / year-range buckets
morie_arsau_ckan_url()
Build the upstream CKAN datastore_search URL for a registry entry
morie_arsau_describe()
Describe a single ARSAU dataset entry
morie_arsau_download()
Bulk-download ARSAU CSVs from the Ontario Data Catalogue
morie_arsau_fetch_sidecar()
Fetch the CKAN sidecar JSON for a registry entry
morie_arsau_load_aggregate_summary()
Load ARSAU aggregate-summary-by-year CSV (2020-2022 only)
morie_arsau_load_detailed_dataset()
Load ARSAU detailed-incident-level CSV (2020-2022 only)
morie_arsau_load_individual_records()
Load ARSAU individual_records CSV
morie_arsau_load_main_records()
Load ARSAU main_records CSV for the given year
morie_arsau_load_probe_cycle_records()
Load ARSAU probe_cycle_records CSV (CEW telemetry)
morie_arsau_load_weapon_records()
Load ARSAU weapon_records CSV
morie_arsau_read_markdown_dictionary()
Read an Ontario-Catalogue Markdown data-dictionary sidecar
morie_arsau_read_sidecar()
Read a CKAN datastore_search JSON sidecar
morie_arsau_read_xlsx_dictionary()
Read an Ontario-Catalogue XLSX data-dictionary sidecar
morie_arsau_registry_df()
ARSAU registry rendered as a tidy data.frame
morie_arsau_sidecar_schema()
Extract a simplified [name, type, notes] schema from a parsed CKAN sidecar
morie_arsau_sidecar_to_frame()
Convert a CKAN sidecar's records array-of-arrays into a data.frame

Specialized & method-family routines

morie_taphonomy_bhm()
Bayesian hierarchical preservation model
morie_taphonomy_clr()
Centred log-ratio (CLR) transform of compositional data
morie_taphonomy_decay_absorption()
Absorption analysis of a taphonomic decay chain
morie_taphonomy_decay_chain()
Build a taphonomic decay Markov chain (DTMC)
morie_taphonomy_decay_delta()
Natural-vs-treated fate delta for a taphonomic decay chain
morie_taphonomy_decay_simulate()
Simulate one decay path through a taphonomic Markov chain
morie_taphonomy_evidence_loglik()
Gaussian log-likelihood of forensic evidence under a model
morie_taphonomy_fetch_usgs_soil()
Fetch USGS National Geochemical Database soil geochemistry
morie_taphonomy_ilr()
Isometric log-ratio (ILR) transform of compositional data
morie_taphonomy_likelihood_ratio()
Forensic likelihood ratio for two competing hypotheses
morie_taphonomy_morphosource_fetch()
Download a MorphoSource media capsule
morie_taphonomy_morphosource_search()
Search MorphoSource for 3D media or physical objects
morie_taphonomy_pmi_schema()
STO-2022 taphonomic-observation schema (PMI nuisance variables)
morie_taphonomy_preservation_delta()
Estimate the natural preservation "delta" and its E-value
morie_taphonomy_preservation_lr()
Preservation likelihood ratio from measured evidence
morie_taphonomy_schema()
Taphonomy data schema (zero-row template)
morie_taphonomy_simulate_pxrf()
Simulate synthetic pXRF compositional data (Dirichlet)
morie_entheo_analyze_subject()
Per-subject DMT vs PCB BOLD pipeline
morie_entheo_available_subjects()
DMT_Imaging: list motion-survived subject IDs
morie_entheo_clone_dmt_imaging()
Clone the DMT_Imaging dataset (Timmerman et al.) into a local cache
morie_entheo_dataset_overview()
DMT_Imaging: dataset overview
morie_entheo_dynamic_functional_connectivity()
Sliding-window dynamic functional connectivity (dRSFC)
morie_entheo_load_eeg_region()
DMT_Imaging: load IRASA EEG regressors for one cortical region
morie_entheo_load_fmri_subject()
DMT_Imaging: load one subject's BOLD AAL parcellation
morie_entheo_lz_complexity()
Lempel-Ziv (LZ76) complexity of a binarised signal
morie_entheo_spectral_band_power()
EEG band-power decomposition via Welch PSD
morie_tox_antemortem_lr()
Likelihood ratio for antemortem ingestion versus postmortem artefact
morie_tox_calibration()
Fit an internal-standard calibration curve and inverse-predict an unknown
morie_tox_ethanol_congeners()
Adjudicate ethanol as antemortem ingestion versus postmortem production
morie_tox_left_censor_impute()
Impute left-censored (below-LOD) toxicology values
morie_tox_matrix_reliability()
Rank specimen matrices by reliability under submersion and decomposition
morie_tox_matrix_schema()
Typed zero-row schema for a forensic-toxicology sample table
morie_tox_pmr_ratio()
Flag postmortem redistribution from a central:peripheral concentration ratio
morie_fauzi_b1_coefficient()
Bias coefficient b_1 (4.14)
morie_fauzi_b2_coefficient()
Bias coefficient b_2 (4.15)
morie_fauzi_b3_coefficient()
Bias coefficient b_3 (4.21)
morie_fauzi_boundary_free_kde()
Boundary-free kernel density estimate by bijection
morie_fauzi_conditions_c1_c6()
Conditions C1-C6 of Chapter 4
morie_fauzi_cumulative_survival_1()
First cumulative survival estimator (4.8)
morie_fauzi_cumulative_survival_2()
Second cumulative survival estimator (4.17)
morie_fauzi_gamma_kde()
Chen gamma-kernel density estimate
morie_fauzi_kde()
Rosenblatt-Parzen kernel density estimate
morie_fauzi_kdfe()
Nadaraya kernel distribution-function estimator
morie_fauzi_kernel_quantile()
Kernel quantile estimator (3.1)
morie_fauzi_lemma_3_1()
Lemma 3.1: asymptotic representation of the kernel quantile estimator
morie_fauzi_mise()
MISE of a second-order kernel density estimate
morie_fauzi_mrl_boundary_free_2()
Boundary-free mean-residual-life estimator (4.24)
morie_fauzi_mrl_naive()
Naive kernel mean-residual-life estimator (4.2)
morie_fauzi_muller_kernel()
Fourth-order Mueller kernel
morie_fauzi_order_m_kernel()
Order-m kernel and its moments
morie_fauzi_quantile_amse()
AMSE of the sample quantile (3.3)
morie_fauzi_theorem_4_3()
Theorem 4.3: biases and variances of the boundary-free MRL estimators
morie_fauzi_theorem_4_4()
Theorem 4.4: asymptotic normality of the boundary-free MRL estimators
morie_fauzi_theorem_4_5()
Theorem 4.5: strong uniform consistency on a bounded interval
morie_fauzi_theorem_4_6()
Theorem 4.6: the mean-residual-life identity at the start of support
morie_psymet_alpha()
Cronbach's coefficient alpha with Feldt CI
morie_psymet_alphadel()
Alpha if item deleted
morie_psymet_ave()
Average variance extracted (AVE) from factor loadings. Mean(lambda^2)
morie_psymet_bartlett()
Bartlett's test of sphericity
morie_psymet_cr()
Composite reliability from standardized factor loadings. CR = (sum lambda)^2 / ((sum lambda)^2 + sum(1 - lambda^2))
morie_psymet_discrimination()
Item discrimination (D-statistic)
morie_psymet_itemtotal()
Corrected item-total correlations
morie_psymet_kmo()
Kaiser-Meyer-Olkin sampling adequacy
morie_psymet_omega()
McDonald's omega total and hierarchical
morie_psymet_parallel()
Horn's parallel analysis – suggested number of factors
morie_psymet_splithalf()
Spearman-Brown split-half reliability

Cryptography

Post-quantum KEM/DEM, hashing, and symmetric primitives.

morie_crypto_chacha20_poly1305_decrypt()
ChaCha20-Poly1305 IETF authenticated decryption
morie_crypto_chacha20_poly1305_encrypt()
ChaCha20-Poly1305 IETF authenticated encryption
morie_crypto_hkdf_sha256()
HKDF-SHA256 (RFC 5869) key derivation
morie_crypto_hqc_decaps()
HQC-128 decapsulation
morie_crypto_hqc_encaps()
HQC-128 encapsulation
morie_crypto_hqc_keygen()
HQC-128 keypair (code-based KEM)
morie_crypto_hybrid_container_version()
Which hybrid container a ciphertext is
morie_crypto_hybrid_decrypt()
Hybrid decrypt: ML-KEM-768 + ChaCha20-Poly1305
morie_crypto_hybrid_encrypt()
Hybrid encrypt: ML-KEM-768 + ChaCha20-Poly1305
morie_crypto_hybrid_keygen()
Generate an ML-KEM-768 key pair for hybrid encryption
morie_crypto_keystore_create()
Create a new empty morie keystore
morie_crypto_keystore_list()
List key names in the morie keystore
morie_crypto_keystore_load()
Load a key pair from the morie keystore
morie_crypto_keystore_public_key()
Public key of a key pair in the morie keystore
morie_crypto_keystore_store()
Store a key pair in the morie keystore
morie_crypto_lamport_keygen()
Lamport one-time signature keypair (native, SHA-256)
morie_crypto_lamport_sign()
Sign one message with a Lamport keypair (native)
morie_crypto_lamport_verify()
Verify a Lamport one-time signature (native)
morie_crypto_liboqs_available()
Is liboqs available in this morie build?
morie_crypto_liboqs_version()
liboqs runtime version string
morie_crypto_mldsa65_keygen()
ML-DSA-65 keypair generation (NIST FIPS 204)
morie_crypto_mldsa65_sign()
ML-DSA-65 signature
morie_crypto_mldsa65_verify()
ML-DSA-65 signature verification
morie_crypto_mlkem768_decaps()
ML-KEM-768 decapsulation
morie_crypto_mlkem768_encaps()
ML-KEM-768 encapsulation
morie_crypto_mlkem768_keygen()
ML-KEM-768 keypair generation (NIST FIPS 203)
morie_crypto_pqc_inventory()
Inventory of the post-quantum families available in this build
morie_crypto_random_bytes()
Cryptographically secure random bytes
morie_crypto_slhdsa_keygen()
SLH-DSA-SHA2-128s keypair (hash-based signatures, FIPS 205)
morie_crypto_slhdsa_sign()
SLH-DSA-SHA2-128s signature
morie_crypto_slhdsa_verify()
SLH-DSA-SHA2-128s verification
morie_crypto_sodium_available()
Is libsodium available in this morie build?
morie_crypto_sodium_version()
libsodium runtime version string

LLM agent & CLI

morie_llm_agent_available()
Return TRUE when a language model is set up
morie_llm_ask()
Send a prompt to a language model
morie_llm_ask_multi()
Ask a language model with a whole conversation
morie_llm_backend() morie_llm_models() morie_llm_chat()
Bring-your-own language model: backend, model list and chat
morie_llm_config()
Show or save the language-model settings
morie_llm_detect_provider()
The language-model route that would answer
morie_llm_login()
Sign in for the curated tables at data.rmorie.com
morie_llm_logout()
Forget the stored data key
morie_llm_ollama_models()
List the models an Ollama server is serving
morie_llm_probe_ollama()
Probe a local Ollama instance
morie_llm_provider_set() morie_llm_provider_show() morie_llm_provider_unset()
Attach your own model endpoint
morie_llm_request_completion()
POST a chat-completion request to an OpenAI-compatible endpoint
morie_run_ebac_selection_ipw_analysis()
Run the eBAC selection-adjusted IPW workflow
morie_run_length_bound()
Mean run length of a restarted detector with false-alarm probability alpha
morie_run_morie_module()
Run one implemented MORIE module against CPADS data
morie_run_morie_modules()
Run multiple implemented MORIE modules
morie_run_pipeline()
Run multiple workflow steps
morie_run_propensity_ipw_analysis()
Run the CPADS propensity/IPW workflow
morie_run_treatment_effects_analysis()
Run an extended treatment-effects analysis (ATE / ATT / ATC + CATE)
morie_run_weighted_logistic_analysis()
Run a weighted logistic-regression analysis
morie_run_workflow_step()
Run one project workflow step
morie_runs_pmf()
Null distributions of the two-sample runs counts
morie_runs_test()
Wald-Wolfowitz runs test (native)
morie_runs_updown()
Exact null distribution of runs up and down

All exported functions (A–Z)

The complete index. Every exported function also appears in a themed section above; this A–Z listing is the exhaustive reference.

A2cv() Ddpgc() Gptas()
Actor-critic, DDPG and beam-search front ends
ARSAU_KINDS()
Known ARSAU dataset kinds
ARSAU_REGISTRY()
Return the ARSAU registry as a list of entries
ARSAU_YEARS()
Known ARSAU year/range keys
Abcrej()
ABC rejection sampler
Adcore()
Anderson-Darling A^2 from probability-integral transforms
Adgev()
Anderson-Darling goodness-of-fit test for a fitted GEV
Adgpd()
Anderson-Darling goodness-of-fit test for a fitted GPD
Admixq()
EM for the ADMIXTURE ancestry likelihood
Admmlasso()
ADMM in scaled form for the LASSO
Adstat()
Anderson-Darling goodness-of-fit statistic (Hedderich eq. 7.33)
Advielbo()
Mean-field ADVI evidence lower bound
Adwin()
ADWIN adaptive windowing for change detection
AffinityPropagation() Clarans() CureClustering() Diana() Chameleon()
Clustering algorithms: affinity propagation, CLARANS, CURE, DIANA, CHAMELEON
Aftfit() morie_survival_aft()
Accelerated failure time regression
Agdproj()
Accelerated projected gradient on a box
AgendaSetterEquilibrium()
Agenda-setter equilibrium in one dimension
Agestd()
Directly age-standardised rate
Agrec()
Andersen-Gill counting-process Cox model for recurrent events
Aicar()
AIC order selection for an autoregression
AitchisonClrCovariance() CompositionalMad() CompositionalPielou() CompositionalQuantileDist() AitchisonBiplot() DirichletFitMom() DirichletSample()
Compositional summaries, biplot and Dirichlet models
AkpD()
Algina-Keselman-Penfield robust effect size (one group)
Alfbkb()
Backbone frame update from a predicted quaternion (AlphaFold)
Alfcrop()
Contiguous residue cropping of AlphaFold training features
Alfdgram()
Distogram prediction head of AlphaFold
Alfembed()
Initial representation embeddings of AlphaFold
Alfevo()
Evoformer block stack (AlphaFold trunk)
Alffape()
Frame aligned point error (FAPE), the main AlphaFold structural loss
Alfipa()
Invariant point attention (AlphaFold structure module)
Alfloss()
Decomposition of the total AlphaFold training loss
Alfmsaat()
MSA row-wise and column-wise gated self-attention (AlphaFold)
Alfopm()
Outer product mean: MSA-to-pair communication in AlphaFold
Alfpae()
Predicted aligned error (PAE) head of AlphaFold
Alfplddt()
Per-residue model confidence (pLDDT) head of AlphaFold
Alfrcyl()
Recycling training objective of AlphaFold
Alfrecyc()
Recycling embedder of AlphaFold
Alfschn()
All-atom coordinates from backbone frames and torsion angles (AlphaFold)
Alfstrtr()
Transition layer of the AlphaFold structure module
Alftmpl()
Template pointwise attention of AlphaFold
Alftriat()
Triangular gated self-attention over the AlphaFold pair representation
Alftrimu()
Triangular multiplicative update of the AlphaFold pair representation
Alfviol()
Structural violation losses of AlphaFold
Alr()
Additive log-ratio transform of a composition against a reference part
Alrinv()
Inverse additive log-ratio transform
Alsmf()
Alternating least squares for implicit-feedback matrix factorisation
Amalgam()
Amalgamate a subset of parts into one, keeping the rest
AmendmentAgenda()
Amendment agenda outcomes
Andrewspsi()
Andrews sine psi function
Andrewswt()
Andrews sine IRLS weight function
AntColonyContinuous()
Ant colony optimization for continuous domains (ACO_R)
Appnp()
Personalised propagation of neural predictions
Arckern()
Arc-cosine kernel matrix
Ardlmd()
ARDL bounds test for a level relationship
AreaInteractionSimulate() AbramsonIntensity() BermanTurnerFit() StKFunction() StGFunction() StJFunction()
Point processes: area-interaction and cluster simulation, LGCP, adaptive intensity, Berman-Turner fits, space-time K, G, J
AreaToPointKriging() NonstationaryKriging() EmpiricalVariogramBins() FitVariogramWls() GaKriging() EmpiricalBayesianKriging()
Kriging with change of support, nonstationarity and variogram uncertainty
Areratio()
Asymptotic relative efficiency of two estimators
Arimacss()
Conditional sum of squares for an ARIMA(p, d, q) model
Arimahr()
Hannan-Rissanen estimation of an ARIMA(p, d, q) model
Arimaxhr()
ARIMAX: exogenous regression with ARMA errors
ArtificialBeeColony()
Artificial bee colony
AsyLaplace()
Asymmetric Laplace distribution
AtLeastOneOfIid() AtMostTwoSuitsProbability() BayesGeneral() BayesSimple() ChainRule() EXSquared() ExactHalfHeads() ExcessScoreFactor() ExpectationLinear() ExponentialCrossingTime() ExponentialWaitingDensity() MorinFactorial() InclusionExclusion3() JointDensityFactorizes() JointIndependent() PmfSd() PmfSumConvolution() PredictionImprovement() ProbOrExclusive() ProbOrGeneral() RegressionToMeanFactor() SdBernoulli() SdFairCoinAvg() SdOfMean() SdOfMeanHetero() SdScale() SlopeFromCov() StarsAndBars() SuitFullHouseProbability() VarScale() VarSumWithCov()
Probability results of Morin's Probability for the Enthusiastic Beginner
Ate() GComp() Late() Pliv() Prsmtd()
Causal effect estimators: IPW regression, g-computation, 2SLS, PLIV, sequential matching, SNFTM
AtmosphericAbsorption() PointSourceLevel() AttenuationDistance() GroundAttenuation() BarrierAttenuation() FoliageAttenuation() NoiseMap() NoiseZones()
Outdoor sound propagation (ISO 9613)
Atompairfp()
Atom-pair fingerprint
AttentionPunctuation() ValenceConvergence() StructureInducedEquilibrium()
Issue salience, attention and valence
Auglag()
Augmented Lagrangian for equality-constrained minimisation
AutomaticZoning()
Automatic zoning procedure (AZP)
Avgpathlen()
Mean geodesic distance, and its harmonic counterpart
Azuma()
Azuma-Hoeffding concentration bound for martingales
Bamodel()
Barabasi-Albert preferential attachment graph
Bamse() Bypvl() Nocse()
Posterior and bootstrap summaries
BandedCholesky() IncompleteCholesky() WendlandTaper() TaperedSimulate() LmcCosimulate() SimulationSensitivity() NestedDecomposition() RefinedSolve() BlockLuSimulate()
LU/Cholesky simulation toolkit
BandwidthDiggle()
Berman-Diggle cross-validated kernel bandwidth
Barte()
BART text-infilling denoising step
Bartkw()
Triangular lag weights that keep a long-run variance non-negative
BasalArea() StandDensityIndex() TreeBiomass() CarbonStock() RasterizePoints() CanopyHeightModel() CanopyGaps() TreeTops() CrownSegmentation() PlotEstimate() StratifiedEstimate() AdaptiveClusterEstimate() LineIntersectVolume()
Forest inventory and LiDAR canopy analysis
Basevap()
FAO-56 Penman-Monteith reference evapotranspiration (Eq. 6)
Basisexp()
Linear basis expansion fitted by least squares (ESL eqs. 2.30, 2.43)
BatAlgorithm()
Bat algorithm
Baujat()
Baujat plot coordinates for a meta-analysis
BayesExp()
Bayes theorem in explicit form
BayesLinearHalfcauchy() FiniteMixtureGibbs() ContaminatedNormalOutliers() BayesA() BayesB() GenomicReliability()
Gibbs samplers for Bayesian regression, mixtures and genomic prediction
BayesOutbreak() CusumSurveillance() EcologicalRegression() LerouxPrecision() Bym2Structure() BufferExposure() KernelExposure()
Spatial epidemiology and disease surveillance
Bayeslogit()
Posterior mode and normal approximation for logistic regression
Bayesocp()
Bayesian online changepoint detection (re-export)
Bayisr()
Sampling-importance-resampling (SIR)
Baynet() bayes_network()
Discrete Bayesian network inference by variable elimination
Baytrace()
MCMC trace summaries: running mean and running quantile bands
Bcdblk()
Cyclic block coordinate descent, exact minimisation per block
Bcelo()
Binary cross-entropy (logistic) loss
Beggtest()
Begg and Mazumdar's rank correlation test for publication bias
BerkeleyEarth()
Berkeley Earth regional temperature average
Bernstein()
Bernstein's concentration inequality
Bertscore()
BERTScore precision, recall and F1
BestConst()
Best constant predictor under squared error
Betabinom()
Beta-binomial conjugate updating
Betavae()
beta-VAE objective with an optional capacity target
Bezout()
Bezout coefficients by the extended Euclidean algorithm
BfgsMinimize()
BFGS minimisation
Bfgsupd()
BFGS secant update of the Hessian and its inverse
Biasvardec()
Bias-variance decomposition of the expected prediction error
Bicarp()
BIC order selection for an autoregression, on the Schwarz penalty
BicubicSpline() BarrierIdw() StewartPotential()
Spatial interpolation extras
Bimid()
Biweight midvariance
BinPoisLim()
Binomial against its Poisson limit
BinaryGlm() SpatialLogitGmm() SpatialProbitGmm() DiscreteMoranTest()
Spatial binary-choice models
BinghamDens()
Bingham distribution on the circle and the sphere
BinomCoef()
Unordered subgroups: the binomial coefficient
BinomCtr()
Centred fair-coin binomial
BinomCtrF()
Factorial form of the centred binomial
BinomDie()
Binomial pmf for a b-sided die
BinomExp()
Binomial expansion of a shifted power
BinomMean()
Binomial mean
BinomMom2()
Binomial second moment
BinomPeak()
Peak height of the binomial distribution
BinomPeq()
Binomial success probability equalising P(0) and P(1)
BinomPmf()
Binomial probability mass function
BinomVar()
Binomial variance
Binseg()
Binary segmentation changepoint search
BlackboxTranspose()
Blackbox-transpose scaling of a respondent-by-stimulus rating matrix
BlissPoints()
Bliss points from preference ratings
BlockBootstrapGrid() StationaryBootstrap() BootstrapBands() ToroidalShiftTest()
Resampling for spatially dependent data
BlockDiscretize()
Discretisation of a rectangular block
BlockWeights()
Block weights from group labels
Blupint()
BLUP of a random intercept
Blupslope()
BLUP of random intercept and slope
Bndapp()
Manski-Pepper MTR-MTS bounds (the returns-to-schooling application)
Bndcvr()
Empirical coverage of replicated intervals, tested against nominal
Bndfre()
Imbens-Manski interval from replicated estimates of the two bounds
Bndinf()
Test-inversion confidence set for an interval-identified scalar
Bndlgt()
Bounds on the causal odds ratio for a binary outcome
Bndlmm()
Intersection bounds from many candidate lower and upper bounds
Bndlpm()
Balke-Pearl sharp ATE bounds by linear programming
Bndmoq()
Sharp quantile bounds for a selectively observed outcome
Bndngt()
Negative-only treatment bound (decreasing monotone treatment response)
Bndnmt()
Bound the complier effect when defiers are not ruled out
Bndnpr()
Nonparametric (kernel) worst-case regression bound
Bndnvg()
Naive gross bound on the average treatment effect
Bndpos()
Positive-only treatment bound (increasing monotone treatment response)
Bndsbs()
Coordinate projection of a d-dimensional identified set
Bndsdo()
ATE bound under monotone treatment selection
Bndtfm()
Worst-case bounds for a monotonically transformed outcome
Bndvld()
Validity check for a collection of bound assumptions
Bnrunstat()
Batch-normalisation running statistics and inference transform
Bnscbo()
Compound-outcome worst-case bound
Bnscnf()
Confidence set for a partially identified parameter (alias)
Bnscom()
Complier means, principal-strata shares and the resulting ATE bound
Bnscrf()
Confidence interval for a partially identified parameter (alias)
Bnsiii()
Identified set as the zero-level set of the moment-inequality criterion
Bnsipv()
Intersection of the instrument bound and the shape bound
Bnssel()
Sample-selection bound for a selectively observed outcome
Bnstst()
Test a null value against the Imbens-Manski confidence interval
Bnstvr()
Intersection bounds on the ATE under an exclusion restriction
Bocpd()
Bayesian online changepoint detection (Gaussian run model)
BookMeans()
Means of the book's five-point data set
Bottomup()
Bottom-up reconciliation of a hierarchical forecast
BoundedDistanceNoise() SelfDualCodeCheck() RunlengthCapacity() RepetitionErrorApprox() RobustSoliton() CodeLengthDecomposition() McGillInteractionInformation()
Coding-theory results from MacKay
Boxpierce()
Box-Pierce Q test for autocorrelation
BrayCurt()
Bray & Curtis (1957) dissimilarity between two non-negative vectors
Brenier1d()
Brenier optimal transport map in one dimension
Bridgs()
Bridge sampling ratio of normalizing constants (Meng-Wong)
Brier()
(IPCW) Brier score for survival models
Brierscore()
Brier score for a categorical predictive distribution
Brrhyper()
Default hyperparameters of the Bayesian ridge regression prior
Bsmed()
Bootstrap percentile CI for the indirect effect in simple mediation
Btwcent()
Betweenness centrality by Brandes' algorithm
Bucherind()
Bucher adjusted indirect comparison
BudykoOlr() PrewhitenedMannKendall() FleissKappa() EmpiricalBreakdownPoint()
Climate and agreement statistics
BufferStripWidth() WetlandAreaPkc() RangeCondition() RotationScore() VariableRateZones() HooghoudtSpacing() DrainWaterTable()
Agricultural design: buffer width, wetland sizing, range condition, rotations, variable-rate zones, drain spacing
BurrDist()
Burr (type XII) distribution
BvNormDist()
Bivariate normal density and distribution function
BvPois()
Bivariate Poisson distribution
BvnModel()
Joint density of X and Y = mX + Z
Bymfit()
Besag-York-Mollie disease-mapping log-posterior kernel
CCRSO_TABLE1_RELEASES
CCRSO Table 1 – 5-year average annual conditional releases
CCRSO_TABLE2_FLOW
CCRSO Table 2 – prisoner flow 2013/14-2017/18
CCRSO_TABLE3_AGE
CCRSO/StatsCan Table 3 – 2018 age distribution
CSRGlobalTest()
DCLF and MAD Monte Carlo tests of complete spatial randomness
CallDemandModel() ErlangC() StaffingRequirement() PatrolCarRequirement()
Calls-for-service demand and queueing-based staffing
CarPoissonTarget() MhSpatial() HmcSpatial() NutsSpatial() TemperedSpatial()
Spatial MCMC: Poisson-CAR target, Metropolis-Hastings, HMC, NUTS and parallel tempering
CarPrecision() SarCovariance() GmrfSimulate() SpatialGlmmSimulate()
Latent Gaussian fields and spatial GLMM simulation
Cardioid()
Cardioid distribution on the circle
CategoricalDist()
Categorical distribution
Catnext()
Pick the next item: maximum Fisher information at the current theta
Cauchw()
Cauchy weight function for iteratively reweighted least squares
Causbckd()
Backdoor-adjusted average treatment effect by stratification
Causdr2()
Double/debiased ML for the partially linear model (DML2)
Causgsw()
Generalizability diagnostics from trial and target sampling scores
Causipw()
IPW average treatment effect on the Crump-trimmed overlap sample
Causmnde()
Natural direct and indirect effects, then split each again
Causrdd()
Sharp regression-discontinuity estimate by local linear fits
Causrddf()
Fuzzy regression-discontinuity estimate (Wald ratio of jumps)
Causrddh()
Imbens-Kalyanaraman plug-in bandwidth for RDD (NBER w14726)
Caustmle()
Targeted maximum likelihood estimator of the ATE
Caustrnsp()
Generalize or transport a randomized-trial effect by weighting
Ccdsgn()
Unmatched case-control OR
Ccelo()
Categorical cross-entropy loss
CcmeWqi() WeightedArithmeticWqi() DoSaturation() CarlsonTsi()
Water quality indices
Ccmem()
Cross-classified membership weight matrix
Ccngg()
Nakagawa-Schielzeth R-squared for a mixed model
Cde()
Controlled direct effect at a fixed mediator value
Cdyll() Hecea()
Years of life lost and the cost-effectiveness plane
CentralizationIndex()
Centralization indices
Cfafm2()
CFA multi-factor with cross-loadings allowed
Cfaftr()
CFA one factor, ML estimation
Chancap()
Channel capacity by the Blahut-Arimoto algorithm
ChangeVector() AccuracyAssessment()
Change vector analysis and thematic map accuracy
Chasym()
Asymptotic-variance check for an IPW marginal structural model
Chebbasis()
Chebyshev polynomial basis of the first kind
Chernbnd()
Chernoff bound on an upper tail
Chgseg()
Penalised mean-change segmentation via PELT
ChiDep()
Tail-dependence chi
ChinesePostman() MultiDepotVrp() SolomonVrptw() PickupDeliveryInsertion() PeriodicVrp() StochasticRouteCost()
Arc and vehicle routing
Chipsq()
ChIP-seq candidate-peak significance (MACS dynamic lambda)
CholeskySim()
Cholesky (LU) simulation of a Gaussian random field
Chowfc()
Chow forecast (predictive-failure) test (Chow 1960)
Chrbnd()
Chernozhukov-Lee-Rosen intersection bounds with independent cells
Chzlt()
Cinelli-Hazlett sensitivity to an unobserved confounder
CiOvlap()
Error-bar overlap rule
Cif() morie_survival_cif()
Cumulative incidence function under competing risks
CircUnif()
Circular uniform distribution
CircularSummary() VonmisesMle()
Circular summaries and von Mises maximum likelihood (circular package conventions)
ClarkeWrightVrp() GravityDistribution() LogitModeShares() TrafficAssignment() WebsterSignal()
Vehicle routing, trip distribution, mode choice, assignment and signals
ClassicalMds()
Classical (Torgerson) multidimensional scaling
Clbuvc()
CLUB upper bound on mutual information
Clcrp()
Distance-dependent CRP
Clipsi()
CLIP image-text similarity
Clipxi()
CLIP image encoder
Clocent()
Closeness centrality
Clr()
Centred log-ratio transform of a composition
Clrinv()
Inverse centred log-ratio transform
Clrmedian()
Geometric median of a composition in clr coordinates
Clrpca()
Principal component analysis in centred log-ratio coordinates
Clstcoef()
Fraction of a node neighbours that are themselves connected
Clus1()
One-stage cluster sample: every element of each sampled cluster
Clusdes()
Choose the cluster size that buys the most precision per unit cost
Cluseq()
SNP-distance sequence clustering
ClusteringIndex()
Spatial clustering indices
Cncpat()
ControlNet attachment
Cndent()
Conditional entropy of a 2-D joint pmf
Cndmi()
Conditional mutual information of a 3-D joint pmf
Cnffvw()
Cinelli-Hazlett sensitivity under a hypothesised confounder
CnsRos()
Rosenbaum sensitivity bounds, Wilcoxon signed-rank
Cnsint()
Concurrent calibration with anchor items
CoherentFields()
Two Gaussian fields with a constant spectral coherence
CoinPmf()
Fair-coin Heads-count pmf
CoinVar()
Variance of one fair coin flip
ColE()
Cold-start user fallback
ColMet()
Recall at k
Colbrt()
ColBERT late interaction
ComVar2()
Modified percentile bootstrap for two variances
Comemb()
node2vec embeddings
Comlou()
Louvain community detection
CompareNeighbours()
Neighbours present in one weights matrix but not the other
Compcen()
Centre of a compositional data set
Compclos()
Closure operator C(x) onto the simplex of constant sum total
Compdist()
Aitchison distance between two compositions
Compgeo()
Geometric mean of the parts of a single composition
Compip()
Aitchison inner product on the simplex
Compjsd()
Jensen-Shannon divergence for compositional data
Compkm()
Lloyd k-means on compositions, run in clr coordinates
Comple()
Score knowledge-graph triples in a complex embedding space
Complrm()
Mean of a compositional sample taken in log-ratio coordinates
Compnorm()
Aitchison norm of a composition
Compshan()
Shannon entropy of a composition
Comptml()
Treatment effect on a composition, estimated in clr coordinates
Comptotvar()
Total variance of a compositional data set
Compvar()
Variation matrix: the pairwise log-ratio variances
ConditionalTurningBands() TbEnsemble() TbBandConvergence() StandardiseRealisations() DirectionalVariogram() ClassProportions() BoundaryProbability() Connectivity() IndicatorVariogram()
Turning-bands conditioning, ensembles and diagnostics of simulations
Configmodel()
Configuration model with a prescribed degree sequence
ConsensusClustering() EvidenceAccumulation() ClusterStability()
Resampling-based clustering: consensus, evidence accumulation, stability
ConstrainedHierarchical()
Spatially constrained hierarchical clustering
ContFr()
Continued fraction expansion of a real number
ContRC()
Content-based recommendation
Contam()
Huber's epsilon-contamination neighbourhood
Conti()
Continued fraction convergents of pi
ContourFill() ContourBands() ContourClip() ContourQuantity() ContourLabels() ContourSmooth()
Contours: isobands, clipping, band quantities, labels, smoothing
Contse()
SimCSE contrastive sentence embedding
ConvexHull() HullMetrics() Delaunay() TriangleQuality() AlphaShape()
Convex-hull shape metrics and alpha shapes
Convgs()
Convergent validity of a reflective construct
Convnx()
ConvNeXt block
CooksD()
Cook (1977) distance for a linear model
CopulaDens()
Bivariate copula densities
CovIndep()
Covariance vanishing test for independence
CovShort()
Covariance by the shortcut formula
CovZMean()
Covariance of zero-mean data
Covpop()
Coverage correction of sampling weights to known population totals
Covrat()
COVRATIO effect of deleting obs i on the precision of beta-hat
CoxProcess()
Cox process given its realised intensity field
Coxsnell() morie_survival_coxsnell()
Cox-Snell residuals from a fitted Cox model
CpAls() TuckerHooi() MatrixFactorizationAls() HaarDwt() HaarMra() HaarDwt2d() HaarMra2d() WaveletDetrend() HarmonicRegression()
Space-time decompositions: CP and Tucker tensors, matrix factorisation, Haar wavelets, harmonic trends
Crp()
Chinese restaurant process seating
Crpcol()
Collapsed Gibbs sampler for a CRP mixture
Crpgib()
CRP Gibbs sampler with auxiliary parameters
Crrcim()
Cumulative incidence function under competing risks
Crsent()
Cross entropy of p relative to q
CrtnRoadNoise() ConstructionNoise() VibrationPropagation() UnderwaterPropagation() NoiseAnnoyance() NoiseHealthRisk()
Road, construction, vibration and underwater noise; dose-response
CsiWeights() CrimeSeverityIndex() ULearnerCate() RepeatedKfoldIndices() FastIca() RstressMds()
Crime Severity Index, U-learner, repeated k-fold indices, FastICA and rStress MDS
Cstat()
Concordance statistic (C-index) for survival models
Ctomeg()
McDonald's omega total
CttAlpha()
Cronbach (1951) coefficient alpha
CttAlphaMax()
Cronbach (1951) alpha with each item deleted in turn
CuckooSearch()
Cuckoo search via Levy flights
Cumcif()
Cumulative incidence function (alias of Crrcim)
Curvature() Viewshed()
Curvature and viewshed
CurveFpca() GcnLayer() SgcRidge() GatLayer() RipsPersistence() PersistenceLandscape() PossibilisticCmeans() RemlComponents() CrossedRandomEffects() NestedRandomEffects()
Functional PCA, graph convolution and attention, persistent homology, possibilistic clustering, REML components
Cuttip()
Gomory cutting-plane method for integer linear programs
D8FlowDirection() FlowAccumulation() Watershed()
D8 flow direction, accumulation and watershed (terra conventions)
DagumDist()
Dagum distribution
DbscanClusters() OpticsOrdering()
Density-based clustering: DBSCAN and OPTICS (dbscan conventions)
Dccgrch()
DCC(1,1) GARCH front end
Dcsub() Prdur() Sactv()
Basic biomedical signal measures
Ddimst()
One DDIM reverse step
Ddqn()
Tabular Double Q-learning on an explicit finite MDP
DeepF()
DeepFM
Deepw()
DeepWalk node embeddings
Deepwk()
DeepWalk node embeddings (alias of Deepw)
Defdtr()
Deformable DETR attention
Deftef()
Design effect DEFF from the two variances
Degmat()
Degree matrix and volume of a graph
Delaunay3D() Voronoi3D() RuppertRefine()
Meshes: 3-D Delaunay tetrahedralisation, 3-D Voronoi cells, Ruppert refinement
DelaunayTriangulation()
Delaunay triangulation by Bowyer-Watson insertion
Denclue() FlameClustering() PossibilisticFcm() GrowingNeuralGas()
Density and prototype clustering: DENCLUE, FLAME, PFCM, growing neural gas
DensProb()
Interval probability from a density on a grid
DensProbC()
Centered-interval probability from a density
DeprivationIndex()
Area deprivation indices (Townsend, Carstairs)
DepthH()
Depth of a point as the thinnest halfspace through it
DepthP()
Stahel-Donoho projection depth
DepthS()
Liu simplicial depth
Desigeff()
Design effect of unequal weighting and clustering
Detrbb()
DETR set prediction
Detrnd()
Linear detrending of a series
Devresid() morie_survival_deviance()
Deviance residuals from a fitted Cox model
Dfbetas()
DFBETAS, the scaled per-coefficient deletion influence
Dfbetb()
DFBETAS scaled change in coefficient j when obs i deleted
Dffit()
DFFITS scaled change in fitted value when obs i deleted
Dffitsols()
DFFITS, the scaled deletion influence on the fitted value
Dgi()
Deep Graph Infomax
DieVar()
Variance of a fair die roll
Difent()
Differential entropy of a density given on a grid
DiffP()
DiffPool differentiable graph pooling
DiffQuot2()
Difference quotient of x squared
DiffQuotN()
Difference quotient of x to the n
Difmh()
Mantel-Haenszel differential item functioning statistic
Difpst()
DIF p-difference per item
Difsib()
SIBTEST differential item functioning (Shealy and Stout 1993)
Dimensionality()
Dimensionality of spatial data
DinfFlowDirection() MfdFlowAccumulation()
D-infinity and multiple flow direction routing
Dinmlt()
DINO multi-crop consistency
Dinocenter()
DINO teacher centring and sharpening
Dinoloss()
DINO self-distillation cross-entropy
Dinov2()
DINOv2 representation objective
DiopT()
Farey sequence of order n
Diophs()
Solve a linear Diophantine equation ax + by = c
DirectSampling()
Multiple-point simulation from a training image
Diripr()
Dirichlet-multinomial conjugate model
DissectionIndex() ForestFragmentation()
Landscape shape and fragmentation indices
DissimilarityIndex()
Dissimilarity and segregation indices
DistM()
Bilinear triple score with a diagonal relation matrix
Distilkl()
Temperature-scaled knowledge-distillation loss
DistrictCompactness()
District compactness
Divgvs()
Fornell-Larcker discriminant validity
Divrate()
Divergent transition count and rate
DixonQ()
Dixon (1953) ratio for the most extreme observation
Doctide()
de Chaisemartin-D'Haultfoeuille DID_M estimator
Dpacct()
Moments accountant for DP-SGD
Dpedt()
Blackwell-MacQueen predictive rule
Dpgem()
GEM stick-breaking weights
Dpineq()
Data-processing inequality for a Markov chain X -> Y -> Z
Dpld()
l-diversity of a released table, in all three senses
Dpmem()
Dirichlet process mixture model
Dpparit()
Pitman-Yor two-parameter process
Dprime()
Lewontin's D' for two biallelic loci from unphased genotypes
Dpsbm()
Dirichlet-process stochastic block model
Dpsing()
Test a Dirichlet-process partition cluster count against its prior
Dpvar()
Differentially private variance of bounded data
Drbnk()
Adaptively-weighted AIPW for data collected by a bandit
Drbsze()
Finite-sample size correction for the doubly robust DiD estimator
Drcef()
Callaway-Sant'Anna event-study aggregation of doubly robust ATT(g,t)
Drclt()
Cluster-robust inference for the doubly robust DiD estimator
Drctf()
DiD with a continuous treatment: ATT(d|d) levels and ACRT slopes
Drhtg()
Heterogeneous conditional ATT: the DR-DiD moment inside each stratum
Drlp1()
LP-DiD: local-projection difference-in-differences with clean controls
Drnpc()
Negative-control falsification for the doubly robust DiD estimator
Dropmask()
Apply a dropout mask with inverted scaling
Drrct()
Experimental selection correction: an RCT-validated control function
Drspa()
Doubly robust DiD with a spatial lag of treatment
Drspr()
Direct and spillover ATT under an exposure mapping
Drsta()
Doubly robust DiD over a staggered adoption design: the ATT(g,t) table
Drvst()
Variance-stabilised DR-DiD: trim the DR weights, report the ESS
Dssoot()
Percentile bootstrap confidence interval for the indirect effect ab
DsspAssign() DsspHbondEnergy()
DSSP secondary-structure assignment from backbone coordinates
Dyntmt()
Value of a dynamic treatment regime under a marginal structural model
EDivisive()
E-divisive multiple changepoint estimation (energy distance)
Eaiprl()
Augmented IPW estimator of the ATE
Eapinfo()
EAP ability estimate with its posterior sd and Fisher information
EbGlobal() EbLocal() ProbabilityMap()
Empirical Bayes rate smoothing and probability maps
Ebfmi()
Energy Bayesian fraction of missing information
Ec25Correction() CesiumRedistribution() IpccSoilCarbon() RweqWindErosion()
Soil process indices
Ecfp4()
Extended-connectivity fingerprint, radius 2 (ECFP4)
Ecfp6()
Extended-connectivity fingerprint, radius 3 (ECFP6)
Editdist()
Levenshtein distance between two sequences
EfaNfactors()
Number of factors to retain
Effmod()
Effect modification on the additive and the multiplicative scale
Eigcent()
Eigenvector centrality
Eigengap()
Choose k from the spectrum: the gap after the small eigenvalues
EkfF()
Extended Kalman filter
EllipticScan() FlexZones() FlexScan() NormalScan() CuzickEdwards() LawsonWaller() FixedCircleScan()
Cluster detection beyond the circular scan
EllisonGlaeser() CoagglomerationIndex() DurantonOverman()
Ellison-Glaeser agglomeration and Duranton-Overman K-density
Elnetr() Lasr() Pcaprx()
Lasso, elastic net and principal component front ends
Emaxr()
EM step (single iteration) for random-effects variance
EmbeddingQuality() AlienationCoefficient() DissimilarityCheck()
Embedding quality, alienation coefficient and dissimilarity checks
Emdtsm()
Empirical Mode Decomposition
Emisinv()
Activity-data times emission-factor inventory
Emkfst()
EM for state-space parameters
Empbnp()
Robbins' nonparametric empirical Bayes
Enetobj()
Elastic net penalized residual sum of squares
Epbias()
Bias correction for exposure misclassification
Epeols()
Expected prediction error of least squares at a test point (ESL eq. 2.27)
Epetheor()
Population least-squares coefficient from second moments (ESL eq. 2.16)
Epicur()
Epidemic curve smoothing
Eqmm()
Mean-mean equating coefficients
Eqms()
Mean-sigma equating coefficients
EquivalentLevel() LevelStatistics() SoundExposureLevel() CombineLevels() DayEveningNight() AircraftDnl()
Environmental noise level statistics and rating indicators
Erdosg()
Erdos-Renyi G(n,p)
Ergmod()
Exponential random graph model
ErlangRenewal() BerksonCorrelation() MillsConditionalMean() BivNormDependence() MaximalCorrelation() BetaBinomialPmf() ArSpectralDensity() AcfSpectralDensity() TelegraphProcess() WienerConditionalCorrelation() SimpleEpidemicDuration() StirlingGammaRatio() MaAutocorrelation()
Closed-form results from Grimmett and Stirzaker
ErrorOperator()
Spatial multiplier of an autoregressive error
Erstst()
Elliott-Rothenberg-Stock GLS-detrended ADF (DF-GLS)
Esllso()
Lasso by cyclic coordinate descent
Esmoeg()
Exploratory SEM with target rotation
Esnnts()
Echo state network (reservoir computing)
EstradaIndex() Communicability() ModularityMatrix() PerronFrobenius() RandicIndex() LabelPropagation()
Spectral graph indices and label-propagation communities
EsumConv()
Expectation of a sum from the convolved pmf
EsumIid()
Expectation of a sum of n i.i.d. variables
Esumtv()
Effective resistance between nodes
Etsmod()
ETS state-space (error/trend/seasonal)
EuclP()
Polynomial GCD via Euclid
Evalu() Evaltw() Jntmed()
E-values and the joint-significance mediation test
Evangia()
Empirical angular measure of the k largest radii
Evdec()
Runs declustering of threshold exceedances
Evespot()
Expected shortfall of a GPD tail above a threshold
Evhpvr()
Heffernan-Tawn conditional extremes model
Evhrid()
Husler-Reiss bivariate dependence
Evmrlp()
Mean residual life plot
Evmsexp()
Bivariate logistic max-stable distribution
Evpdfn()
Empirical Pickands dependence function
Evpot()
Peaks-over-threshold GPD fit + scale-invariance check
Evstud()
Event-study leads + lags coefficients
Evtlmom()
Trimmed L-moments TL(s,t) of a sample
Evtrecords()
Upper record times and counts in a sequence
Evtsthr()
Threshold selection by local variance of the GPD estimates
Evvarpot()
Value-at-risk from a fitted GPD tail
Exp3()
Exp3 exponential-weight adversarial bandit
ExpIntP()
Exponential waiting-time interval probability
ExpLinApx()
Linear approximation to the exponential
ExpMean()
Mean of an exponential waiting time
ExpMom2()
Second moment and variance of an exponential waiting time
ExpTaylor()
Taylor series for the exponential
ExpectedCounts() StandardizedRatio()
Indirect standardisation and standardised ratios
Expkern()
Exponential (Laplace) kernel matrix
ExplPow()
Explanatory power
ExposureIndex()
Exposure (interaction) index
Exptest()
Certify that a test sequence has exponentially small error probabilities
FDiverg()
Csiszar (1967) f-divergence D_f(p || q) = sum q f(p/q)
FacilityLocation()
Uncapacitated facility location
FactorialKrige()
Factorial kriging of one nested component
Fano()
Fano lower bound on the error probability of an M-ary test
Farsig()
Farrington flexible algorithm
FayHerriot() BhfEblup()
Fay-Herriot and Battese-Harter-Fuller small-area EBLUPs
FcaAccessibility() GravityAccessibility() NearestFacility() RadiationFlows()
Spatial accessibility: FCA family, gravity access and nearest facility
Fcfp4()
Functional-class fingerprint, radius 2 (FCFP4)
Fdaclust()
Functional clustering by k-means on B-spline coefficients
Ferror()
Renewal-equation forecast
Fevdc()
Forecast error variance decomposition from a VAR(1)
FillSinks()
Priority-flood depression filling
FilterSim()
FILTERSIM multiple-point simulation
FilteredKrige() IndicatorCcdf() KrigingEfficiency() CollocatedCokriging()
Kriging filters, indicator ccdf, kriging efficiency and collocated co-kriging
Finalsz()
Final epidemic size (Kermack-McKendrick)
Finegray() morie_survival_finegray()
Fine-Gray subdistribution hazard model
FireflyAlgorithm()
Firefly algorithm
FiskDist()
Fisk (log-logistic) distribution
Fistalasso()
FISTA for the LASSO
FitVariogram()
Weighted least squares variogram fitting (gstat fit.variogram weights)
Flmgcr()
Flamingo gated cross-attention
FlowCapturingLocation()
Flow-capturing location model
Flowmm()
Maximum flow / minimum cut
Flsh2()
FlashAttention tiled exact attention
Fnested()
F-test for a nested pair of linear models (ESL eq. 3.13)
FocalStatistics() FilterKernel() FocalFilter() CannyEdges() GreyMorphology()
Focal statistics, filters and grey morphology
FoodDesert()
USDA low-income, low-access (LILA) food deserts
Fpc()
Finite population correction factor for sampling without replacement
Frdbnd()
Frechet-Hoeffding bounds on a joint distribution
FrechetDist()
Frechet distribution
FriedF()
Friedman's test in F form
FrmlD()
Formal derivative of a polynomial
Frtaxd() forest_taxon_diversity()
Spatial Shannon-Wiener taxon diversity on a rectangular grid
Frwol2()
Frank-Wolfe conditional gradient
FuzzyCmeans() MeanShift()
Fuzzy c-means and Gaussian mean shift
Fwlfwd()
Fully corrective Frank-Wolfe
Fxidf()
Test whether the effect of X differs across levels of a modifier
GHSecant()
Generalized secant hyperbolic distribution
GMErrorSAR()
Spatial error model by generalised moments
GS2SLSSAC()
SAC model by generalised spatial two-stage least squares
GWRBasic()
Geographically weighted regression with its diagnostics
GWRKernelWeights()
Geographical kernel weights of one regression location
Ga_opt()
Genetic algorithm with elitist truncation selection
GammaFromLambdaDelta() AmplifyGamma() UStatisticSensitivity() CrosscutTest() CrosscutDesignSensitivity()
Observational-study sensitivity: amplification, U-statistic bounds, crosscut test and design sensitivity
Ganomscore()
GANomaly anomaly score from encoder-decoder-encoder latents
Gat()
Let each node decide how much to weight each neighbour
GatV2()
GATv2 attention layer
Gatemd()
Multi-head graph attention layer
GaussApx()
Gaussian approximation to the centred fair-coin binomial
GaussCount()
Expected Gaussian count over N repetitions
GaussDom()
Domain check for the Gaussian approximation
GaussTail()
Gaussian ordinate many standard deviations out
Gausslik()
Gaussian conditional log-likelihood (ESL eq. 2.35)
Gaussm()
Gaussian mechanism for differential privacy
Gblupeq()
Cholesky re-parameterization that makes GBLUP an ordinary mixed model
Gblupr()
Genomic BLUP
Gbtcom()
Goodman-Bacon three-way composition of the TWFE DiD coefficient
GcnII()
GCNII: initial residual plus identity mapping
GcnL()
Graph convolution with the renormalisation trick
Gcnchb()
ChebNet spectral filter
Gcnemd()
Graph convolution layer before the renormalisation trick
Gdpf()
Gaussian differential privacy: the trade-off function
GelmanKingIncumbency() ProportionalSeats() RunoffWinner() NetworkPolarization()
Electoral systems and legislative polarization
GenLambda()
Generalized lambda distribution (Ramberg-Schmeiser)
Genvdm()
D study: project a G study onto a proposed facet size
Genvxt()
Generalizability coefficient for the crossed p x i design
GeomExp()
Expectation of the geometric distribution
Gesd()
Generalized ESD test for outliers (Rosner 1983)
Getisordg()
Getis-Ord global G, with its exact randomisation moments
Gevcdf()
GEV distribution function (Coles 2001 eq. 3.2)
Ghosalabsolutecontinuity()
Posterior via Radon-Nikodym under domination
Ghosaladaptthm()
Adaptive hierarchical model prior
Ghosalbayesruleinfinite()
Bayes's rule with a dominated likelihood
Ghosalbbcensored()
Bayesian bootstrap for censored data
Ghosalbernsteinfeller()
Bernstein-Feller approximation of a CDF
Ghosalbetaprocdef()
Beta-process definition
Ghosalbmprior()
Brownian-motion prior
Ghosalbpcont()
Beta-process Levy measure
Ghosalbpdiscrete()
Discrete-time beta process
Ghosalbppathgen()
Beta-process path by Poisson jumps
Ghosalcoxbvm()
Semiparametric Bernstein-von Mises for the Cox model
Ghosalcoxbvmsp()
Cox-model Bernstein-von Mises
Ghosalcoxmodel()
Cox model with a beta-process baseline
Ghosalcoxpost()
Cox posterior via the partial likelihood
Ghosalcredsetcov()
Credible-set frequentist coverage
Ghosaldpbvm()
Dirichlet-process Bernstein-von Mises (Brownian bridge)
Ghosaleffinflfn()
Efficient influence function for F(t)
Ghosalepgp()
Expectation propagation for Gaussian process classification
Ghosalexplink()
Exponential-link density prior
Ghosalfbmprior()
Fractional Brownian motion prior
Ghosalfrsbinreg()
Random-series binary regression
Ghosalfrsdensity()
Density estimation via a finite random series prior
Ghosalfrspoireg()
Random-series Poisson regression
Ghosalfrsreg()
Finite-random-series regression
Ghosalfuncreg()
Functional linear regression
Ghosalgpadaptthm()
GP length-scale adaptation
Ghosalgpbinregcrt()
GP binary-regression contraction
Ghosalgpcrtthm()
Gaussian contraction-rate equation
Ghosalgpdefrkhs()
Gaussian process RKHS, Euclidean case
Ghosalgpdenscrt()
GP density estimation contraction rate via the concentration function
Ghosalgpincreasingprior()
Increasing-process prior via an exponentiated Gaussian process
Ghosalgplaplace()
Laplace approximation for GP posteriors
Ghosalgppriordef()
Gaussian-process prior draw
Ghosalhistogramprior()
Histogram (binning) density prior
Ghosalinfdimbvm()
Parametric Bernstein-von Mises
Ghosalmixbp()
Mixtures of beta processes
Ghosalmixturebasisprior()
Mixture-of-kernels density prior
Ghosalmodselbic()
Bayes-factor model selection consistency
Ghosalnpbinaryreg()
Nonparametric binary regression with a Gaussian process prior
Ghosalnpnormalreg()
Nonparametric normal regression with a Gaussian process prior
Ghosalnppoissonreg()
Nonparametric Poisson regression with a Gaussian process prior
Ghosalntrbvm()
Neutral-to-the-right functional Bernstein-von Mises
Ghosalntrconsist()
Neutral-to-the-right posterior consistency
Ghosalntrdef()
Neutral-to-the-right processes
Ghosalntrlevy()
Neutral-to-the-right Levy (Laplace) functional
Ghosalparamnpbf()
Parametric versus nonparametric Bayes factor
Ghosalparamrate()
Adaptation to a parametric truth
Ghosalpriorposteriorupdate()
Sequential prior-to-posterior updating
Ghosalrandombasisexpansion()
Random basis expansion prior
Ghosalrescalgp()
Rescaled Gaussian process
Ghosalrkhsnorm()
Concentration-function terms
Ghosalrlprocess()
Riemann-Liouville process
Ghosalrndseriespr()
Random-series prior with random dimension
Ghosalselfsimgp()
Self-similarity of fractional Brownian motion
Ghosalsemiparabvm()
Semiparametric Bernstein-von Mises for a smooth functional
Ghosalsemiparaeff()
Semiparametric efficiency bound
Ghosalseriesgp()
Series (eigenexpansion) Gaussian process
Ghosalsmhazgp()
Smooth hazard via a Gaussian process
Ghosalstatgpspec()
Stationary GP via Bochner's theorem
Ghosalstrictsbvm()
Strict semiparametric Bernstein-von Mises conditions
Ghosalstrongapxdp()
Strong approximation for the Dirichlet process
Ghosalsurvdpkm()
DP posterior survival and its Kaplan-Meier limit
Ghosalsurvdppost()
Dirichlet-process posterior with right-censored data
Ghosaltwomodeladp()
Two-model adaptation
Ghosalunivweights()
Universal model weights
Ghosalwnadapt()
Spike-and-slab white-noise adaptation
Ghosalwnfullbvm()
White-noise full Bernstein-von Mises
Ghosalwnlinbvm()
White-noise linear-functional Bernstein-von Mises
GibbsPseudolikelihood()
Maximum pseudolikelihood for Gibbs point processes
Gibbsm()
Gibbs sampler
GirvanNewman()
Girvan-Newman communities
GlmProfCI()
Profile likelihood interval for a GLM coefficient
GlmStdRes()
Pearson and standardized Pearson residuals for binomial and Poisson GLMs
Glpopt()
Linear programme by the two-phase primal simplex method
Gmsbound()
Generalised moment selection test statistic
Gnsetenr()
Gene-set enrichment analysis enrichment score (GSEA)
Goenr()
GO term enrichment (hypergeometric upper tail)
GpClassify() GpSparse() KumaraswamyWarp() DeepGpSample()
GP classification, sparse GPs, warping and deep-GP samples
GpCovariance() GpPredict() GpSample() GpFit() GpLoo()
Gaussian process regression, sampling and fitting
Gpcgs()
Sparse variational GP classification
Gpcla()
Gaussian process classification by the Laplace approximation
Gpcm()
Generalized partial credit model
GpdD()
Generalized Pareto distribution
GpdDistribution() Gpfit()
Generalized Pareto distribution and its threshold-exceedance fit
Gpdcdf()
GPD distribution function of threshold excesses (Coles 2001 eq. 4.2)
Gpdkl()
Deep kernel learning
Gpdsh()
Density-shift detection on a stream by Kullback-Leibler divergence
Gphtr()
Heteroscedastic Gaussian process regression
Gpkern()
Composing Gaussian process kernels
Gpmlt()
Multi-task Gaussian process
Gpmoe()
Predict from K Gaussian-process experts under a softmax gate
Gppost()
Posterior mean of a Gaussian process at new inputs
Gpreg()
Gaussian-process regression with a squared-exponential kernel
Gpregb()
Gaussian process regression with the hyperparameters integrated out
Gpresid()
Gaussian process fitted to the residuals of a parametric fit
Gpsps()
Spectral mixture kernel GP
Gpsvi()
Sparse variational GP regression
Gpt2()
GPT-2 decoder-only language model
Gpvar()
Predictive variance of a Gaussian process
Gpvbo()
Bayesian optimisation: expected improvement under a GP posterior
Gradds()
Gradient descent
GraphDegreeCentrality() GraphDiameter() GraphBetweenness() CdclSolve() CrfMarginals() CrfViterbi() CrfFit()
Graphs, SAT and CRFs: degree centrality, diameter, betweenness, CDCL, linear-chain CRF
GraphModularity() FastGreedyModularity() WalktrapCommunities()
Community detection: fast greedy modularity and walktrap
Graphlap()
Combinatorial (unnormalised) Laplacian of a weighted graph
GravityPPML()
Gravity model of flows by Poisson pseudo-maximum likelihood
GreyWolfOptimizer()
Grey wolf optimizer
GridContiguity() DistanceBandWeights() KnnWeights() InverseDistanceWeights() KernelWeights() SymmetrizeWeights() WeightsComponents()
Spatial weights construction
Grmsam()
Samejima graded response model
GroupAvg()
Group-average relation
GroverS()
Grover quantum search
GrowingDegreeDays() ChillAccumulation() LaiFromSavi() RainfallAdequacy() GrowingSeasonLength() ColdSpellDuration()
Agroclimatic indicators
GrubbsT()
Grubbs (1969) test that the most extreme observation is an outlier
Gstabwt()
Stabilized inverse-probability-of-treatment weights
GtDorfman()
Dorfman group testing operating characteristics
GtPrev()
Prevalence from group testing
GtRegEM()
Group testing regression by Xie's EM algorithm
GtwrFit() MgwrBackfit() GaussianHmm()
Space-time models: GTWR, multiscale GWR by backfitting, Gaussian hidden Markov models
GumbelDist()
Gumbel (type I extreme value) distribution
GwrCollinearity() GwrPredict() GwrFTests() GwSummary()
GWR collinearity diagnostics, prediction, F tests and GW summary statistics
Gxeblup()
Multi-environment genomic model with a genotype-by-environment term
HalfHeads()
Stirling approximation to the half-heads probability
HarrisHawksOptimizer()
Harris hawks optimization
Hazratio() morie_survival_hr()
Hazard ratios with confidence intervals
HealthConcentrationIndex() SpatialGini() TheilDecomposition()
Health inequality indices
Hendmme()
Henderson's mixed model equations for the BLUE and the BLUP
Hertbg()
Genomic heritability from a relationship matrix
Hetero()
Heterotrait-monotrait ratio of correlations (HTMT)
Hetlc() Mmaxn()
Marker heterozygosity and min-max normalisation
Hetmix()
Basic reproduction number under heterogeneous mixing
Hexgrd() hexagonal_grid()
Hexagonal grid binning (Carr hbin)
Hffdsg()
Hoeffding's inequality
HierarchicalClustering() CutTree()
Agglomerative hierarchical clustering and tree cutting (hclust conventions)
Hiermodel()
Hierarchical normal model: shrinkage of group means towards mu
Hillq()
Hill numbers of order q
Hillshade()
Hillshade (terra shade)
HistogramTransform()
Map values onto a target marginal distribution by ranks
Hits()
HITS hubs and authorities
HitsR()
Hit rate at k
Hittime()
Expected steps for a simple random walk to reach a target vertex
Hmcsam()
Hamiltonian Monte Carlo
Hmicl()
In-context learning by prompt-conditioned scoring
HmmTag()
Hidden Markov part-of-speech tagging by the Viterbi algorithm
Hmmprf()
Profile hidden Markov model: forward likelihood and Viterbi alignment
Hmstrn()
Effect of a treatment rule read off from each time point onwards
HockStick()
Hockey-stick identity
Hodprc()
Hodrick-Prescott filter
Holmadj()
Holm step-down multiple-testing procedure (Holm 1979)
Hotcld() hot_cold_spots()
Getis-Ord Gi-star hot and cold spot map with FDR screening
HotellingModel()
Hotelling-Downs competition of n candidates over uniform voters
Hsirt() Lordzs() Semthe() Ave()
Item response diagnostics: unpredictable voters, Lord's DIF test, SE of theta and average variance extracted
Htebias()
Best-linear-predictor calibration test for heterogeneous treatment effects
Htvar1()
Horvitz-Thompson variance of the estimated total
Huberw()
Huber weight function
Hubrho()
Huber loss function
Hubsa()
HITS run to convergence
HyperLim()
Hypergeometric pmf against its binomial limit
HypercubeQueue() SquareRootLaw() ShortCrimeLattice() ShortCrimePde()
Police operations research models
Ibdmtx()
Pairwise identity-by-descent matrix (PLINK method of moments)
Icarbm()
Intrinsic conditional autoregressive prior
Icc12c()
The six Shrout-Fleiss intraclass correlations from one rating table
IccA()
Agreement that counts a systematic rater offset as disagreement
IccC()
Agreement up to a constant offset per rater
Idealf()
Ideal fourths
IdfFit() UnitHydrograph() ConvolveRunoff() BaseflowFilter() HydrographSummary()
Rainfall-runoff: IDF curves, unit hydrographs, baseflow and hydrograph summaries
IdwPredict() IdwCv() IdwPowerSearch() ShepardPredict()
Inverse distance weighting, cross-validation and modified Shepard weights
Igrav() Igravbl() Igravcl() Igraver() Igravfe() Igravlm() Igravnb() Igravrt() Igravsq() Igravvf() Igravwl()
Gravity and spatial interaction models
Ihstst()
Integrated haplotype score (iHS) for one core SNP
Imai()
Average causal mediation effects under sequential ignorability
ImperviousIndices()
Impervious-surface indices
Incrtio()
Incidence rate ratio
Infcrt()
WAIC and PSIS-LOO computed from the same draws, so they can disagree
Infgnt()
Fisher information metric of a parametric family
Infiltration() ScsRunoff() Rusle()
Infiltration, runoff and erosion models
Intanl()
Treatment by covariate interaction in a marginal structural model
Intlpa()
Interior-point linear programming by the logarithmic barrier
Intmd4()
Split a total effect into mediation, interaction, both, neither
Intvse()
Effects defined by shifting the mediator distribution, not the value
InvPredCI()
Inverse-prediction interval in a logistic model
Ipferd()
IPW estimate with a replicate-weight (jackknife) variance
Ipfsfa()
Barrier interior-point solver for smooth inequality-constrained problems
IpwSn()
IPW sensitivity analysis for a non-ignorable selection mechanism
Ipwsrv()
Inverse probability weighting combined with survey design weights
IqrA()
Flag points outside the Tukey fences
Irfun()
Orthogonalised impulse response function of a VAR(p)
Irlsfn()
One outer iteration of iteratively reweighted least squares
IrrigationWaterQuality() TotalDissolvedSolids() SuspendedSolids() ConstituentLoad() RemovalEfficiency()
Irrigation suitability, solids, loads and treatment removal
Irt1pl()
Rasch one-parameter logistic model
Irt4pl()
Four-parameter logistic item response model
Irtgpc()
Generalized partial credit model (alias of Gpcm)
Irtgrm()
Samejima graded response model (alias of Grmsam)
Irtmh1()
Mantel-Haenszel differential item functioning
Irtprc()
Masters' partial credit model
IsoLines()
Contour lines by marching squares
IsolationIndex()
Isolation index
Itinft()
Item information function
Itnnrs()
Item nonresponse adjustment by weighting classes
Itr2dd()
Optimal individualized treatment regime chosen by DR-DiD value
Itrct1()
Doubly robust DiD with a treatment by covariate interaction
Itrlrn()
Iterative Q-learning (backward induction) for a dynamic regime
Ivartest()
Anderson-Rubin weak-instrument-robust test
Ivclr()
Moreira conditional likelihood-ratio weak-IV-robust test
Ivfstage()
First-stage F statistic for weak instruments
Iwdid()
Sun-Abraham interaction-weighted difference in differences
Jackvar()
Jackknife variance for survey estimates
Jarow()
String similarity that rewards a shared prefix
JayaAlgorithm()
Jaya algorithm
Jntent()
Joint entropy of a 2-D joint pmf
Jntfr()
Joint shared-frailty model for recurrent events and a terminal event
Jntlmm()
Two-stage joint model for a longitudinal outcome and survival
JohanQ()
Johansen test of a linear hypothesis about trimmed means
JohnsonSB()
Johnson SB distribution
JohnsonSU()
Johnson SU distribution
JoinCountMulti()
Join counts for a map of k colours
Joincnt()
Join-count statistics for binary spatial data (Cliff and Ord 1981)
JordanCanonical() GaloisGroup() ShuntingYard()
Exact algebra: Jordan form, Galois groups, shunting yard
Jsdiv()
Jensen-Shannon divergence between two discrete distributions
JtcDecay() JtcSurface() JtcCalibrate() CircleHypothesis() SearchCost() RiskLayers() RiskTerrain()
Crime geography: journey to crime, circle hypothesis, hit score and risk terrain
Jzdiff()
Jensen-Shannon divergence
KPMoments()
Kelejian-Prucha moment system for a spatial autoregressive error
Kabsch()
Kabsch optimal superposition
KalmS()
Rauch-Tung-Striebel fixed-interval smoother
Kalmf()
Kalman filter for the linear Gaussian state space model
Kanon()
k-anonymity check on a set of quasi-identifiers
KappaCoh()
Cohen (1960) kappa for two raters
KappaWt()
Cohen (1968) weighted kappa
Kappacoef()
Cohen's Kappa coefficient of agreement for a two-class confusion table
Katz()
Katz centrality
Katzc()
Katz centrality excluding the length-zero walk
Katzcn()
Katz centrality with an explicit baseline weight
Kcompo()
Sequential composition of k differentially private mechanisms
Keggp()
KEGG pathway over-representation analysis
KentDens()
Kent (FB5) density on the sphere
Kernblup()
Kernel covariance of a replicated-line predictor
KernelCusum()
Kernel change-point analysis (KFDR running-maximum scan)
KernelIntensity()
Gaussian kernel intensity of a point pattern with edge corrections
KernelPoint()
A kernel point of a transferable-utility game by Stearns' transfers
Kgnn()
Relational graph convolution (R-GCN)
Khatd()
Shape of the importance-weight tail, per observation
KimFordingMedian()
Kim and Fording (1998) median voter from party positions and votes
Klchain()
Chain rule for relative entropy
Kldsupp()
Check the extended Schwartz conditions and return the resulting bound
Klmcmc()
Kullback-Leibler diagnostic between an MCMC chain and its target
Klmflt()
Kalman forward recursion driven by a model specification
Klmsm1()
Kullback-Leibler divergence with additive smoothing for sparse counts
Klmsmh()
RTS backward recursion applied to an existing forward pass
KmeansLloyd() PamMedoids()
Partitioning clustering: Lloyd k-means and PAM
KnnDistances() QuadratTest() MorisitaIndex() CrossK() SegregationTest()
Point-pattern extras: nearest neighbours, quadrats, Morisita, cross-K, segregation
KnoxTest() NearRepeatTable() MantelTest() GeographicProfile() AoristicWeights() Kde2d() CrossCorrelation() EofAnalysis()
Space-time interaction, Mantel, geographic profiling and related tools
Konfound()
Robustness of an inference: percent bias to invalidate, RIR and ITCV
Kpmnci()
Pointwise confidence interval for a Kaplan-Meier curve (Greenwood)
Kpmsmp()
Hall-Wellner simultaneous confidence band for a Kaplan-Meier curve
Krfgrp()
Stochastic Kronecker graph edge-probability model
Krig()
Ordinary kriging with a spherical variogram
KrigCl()
Ordinary kriging (alias of Krig)
Krige()
Kriging prediction and variance (gstat conventions)
KrigeCV()
Cross-validation of kriging (gstat krige.cv)
KrigeLognormal()
Lognormal kriging with the unbiased back-transform
KrigingCovariance()
Covariance of a gstat vgm model
KrigingQuantile() KrigingExceedance()
Gaussian quantile and exceedance maps of kriging predictions
KrigingSystem()
Augmented universal kriging system
Krigsm()
Ordinary kriging interpolation (alias of Krig)
Krpalp()
Krippendorff's alpha reliability
KrrFDA()
Ridge regression carried out on inner products instead of features
Krreg()
Kernel ridge regression in its dual form
Ksamp()
K-sample Anderson-Darling test
Kstest1()
Two-sample Kolmogorov-Smirnov test of H0: F1 = F2
Ktrend()
Kendall rank-correlation test for monotone trend (Kendall 1938)
Kvquant()
Quantize one vector: rotate, scalar-quantize, dequantize, rotate back
L1med()
Multivariate median that minimises total distance, not squared distance
L2pen()
Ridge (weight-decay) regularized loss
LMSpatialTests()
Lagrange multiplier tests for spatial dependence after OLS
LabelPatches()
Patches of a categorical raster
Lacgear() Lacgetg() Lacgmc() Laclisa() Laclihh() Laclihl() Laclimc() Lacscat() Lacscor() Lacbivl() Lactest() Lacvgm()
Lattice spatial autocorrelation statistics
LagOperator()
Spatial lag operator
LanchesterSquareOutcome() LanchesterSimulate() LanchesterFit()
Lanchester attrition models
Landmark() morie_survival_landmark()
Landmark analysis of survival
LandscapeFragmentation()
Landscape fragmentation
LapEig() laplacian_eigenmaps()
Laplacian eigenmap embedding
Lapeig()
Eigenvectors of the normalised Laplacian for the k smallest values
LaplaceDist()
Laplace distribution
LaplaceTransformNum() TalbotInverse() StehfestInverse() LaurentCoefficients() HadamardTransform() HadamardInverse() PolyExpand() PolyFactorModP() RationalCancel() HeatEquationSeries() QuadraticRoots() FunctionalNorm()
Analytic tools: Laplace transform and inversion, Laurent coefficients, Walsh-Hadamard, polynomials, heat equation
Lapspec()
Eigenvalues of the normalised Laplacian, in increasing order
Lassoobj()
Penalized residual sum of squares of the lasso, with its soft-threshold step
Lassrg()
Least squares with an L1 penalty, which selects while it shrinks
LateralRange() SweepWidth() SearchPod() ParallelSweepPod() SearchSuccess() DatumProbabilityMap() OptimalCircularSearch() OptimalEffortAllocation()
Search theory for search and rescue planning
LatticeRandomWalk() CrwMsd() CorrelatedRandomWalk() BrownianMotion() BrownianBridgeUd() SitePercolation()
Random walks, Brownian motion, Brownian bridges and percolation
Layrnm()
LayerNorm per-token normalization
LbfgsbMinimize()
L-BFGS-B bound-constrained minimisation
Lctest()
Nyblom-Hansen test that every OLS parameter is stable
Ldcmpr()
Linkage disequilibrium r-squared between two biallelic loci
Ldphr()
Hadamard response estimator for local differential privacy
Ldprun()
LD-based variant pruning (PLINK indep-pairwise scheme)
Lecam()
Le Cam's bound on the posterior mass of an alternative set
Leid()
Partition a graph into well-connected communities
LemR() leiden_grph()
Leiden refined community detection
Lftrt()
Kaplan-Meier estimator with left truncation (delayed entry)
LgcpSimulate() LgcpMoments() ThomasSimulate() ThomasPcf() VoronoiResiduals()
Cox point processes
Lgtnfit()
Fit the logistic-normal by transforming, then fitting a normal
Lgtnpdf()
Additive logistic-normal density at a composition
Lgtnsim()
Draw compositions from a logistic-normal via the alr inverse
LinModel()
The Y = mX + Z correlation model
LinModelInv()
Y = mX + Z model from sigma_x, sigma_y and r
Linatt()
Linformer linear-complexity attention via low-rank projection
LinconBT()
Bootstrap-t all-pairs comparison of trimmed means
LinearAssignment()
Linear sum assignment (Hungarian method)
Linkpr() link_prediction()
Link prediction scores: common neighbours, Adamic-Adar, resource allocation
Lints()
Linear Thompson sampling for contextual bandits
LipinskiRuleOfFive() VeberRules() EganEgg() OralBioavailabilityRules()
Oral drug-likeness rule filters
Lisamoran()
Local Moran's I per location (re-export)
Ljungbox()
Ljung-Box Q test for autocorrelation
LkjCorr()
LKJ density on correlation matrices
Llgsq()
Goodness of fit of a loglinear model: Pearson chi-squared and G^2
LmcCovariance() LmcCokriging()
Linear model of coregionalization and cokriging
Lmmform()
Linear mixed model in the form Y = X beta + Z u + e, with its two means and marginal variance
Lmpi()
Prediction and mean-response intervals for the linear regression model
Lnfrm()
Log-normal frailty Cox model (penalized partial likelihood + REML)
LocalGetisOrd()
Local Getis-Ord Gi and Gi* statistics
LocalMoranBivariate()
Local bivariate Moran statistic with conditional permutation
Localgeary()
Local Geary's c per location
Localmoran()
Local Moran's I (LISA)
LocationQuotient() KrugmanIndex() LqGini() HerfindahlIndex()
Regional specialization and concentration indices
LogRSM()
Kernel smoother for a binary outcome
LogitCompetition()
Multiparty competition under logit probabilistic voting
LogitVote() ProbitVote() CauchyVote() NormalVote() BoltzmannVote() MixedLogitVote() ProximityVote() QuadUtility() MedianVoter2d() UtilityMax() VoteTrading() VoteTrade2d() WeightedVote() DiscountUtility() MixedUtility()
Spatial voting models for one voter
Logor()
Odds ratio over a fixed interval of an interval-scaled predictor
Logrank()
Mantel log-rank test comparing two survival curves
Loopr()
Replace the largest importance weights by fitted Pareto quantiles
Lpdual()
Form the dual of a linear program and certify a pair of solutions
Lppd()
lppd, effective parameters and WAIC from a matrix of log densities
Lrresid()
Residual analysis for the logistic regression model
Lrtest()
Likelihood ratio test from two maximised log-likelihoods
Lrwald()
Wald statistic and confidence interval for logistic-regression coefficients
LsqFit()
Least-squares line
LsqResid()
Residual sum at the least-squares optimum
LsqRev()
Reverse least-squares line
Ltkm() morie_survival_left_truncated_km()
Kaplan-Meier estimator under left truncation
LuvR() louvain()
Louvain community detection with a resolution parameter
Lzcomp()
Count the distinct phrases a sequence needs to build itself
MORIE_FAIRNESS_CANONICAL_FIELDS
The five canonical per-area fields the audit consumes
MORIE_FCFP_FEATURE_CLASSES
Pharmacophoric feature classes used by FCFP, in RDKit bit order
MORIE_SIUIAP_AFFIDAVITS
Federal Court affidavits / expert evidence indexed by morie
MORIE_SIUIAP_CRIMSL_REPORTS
CRIMSL UToronto Sprott / Doob / Iftene research reports (2020-2021)
MORIE_SIUIAP_ORIGINAL_PANEL_2019_2020
Earlier (Doob-chaired) panel, established 2019, dissolved mid-2020
MORIE_SIUIAP_PANEL_MANDATE
SIU IAP panel mandate (long-form prose)
MORIE_SIUIAP_PANEL_MEMBERS
SIU IAP panel members (2021-2024 panel, Sapers-chaired)
MORIE_SIUIAP_REPORTS
SIU IAP panel reports (Public Safety Canada, 2022-2024)
MORIE_SIUIAP_URL
SIU IAP – Public Safety Canada landing page URL
MORIE_TPS_CSI_CATEGORIES()
Canonical CSI category names (the 9 TPS open-data feeds)
MORIE_TPS_REGISTRY
Registry of TPS open-data categories
MORIE_TPS_SUPPORTED_FORMATS
Format names that morie_tps_load() knows how to dispatch
MORIE_TPS_TORONTO_POPULATION_BY_YEAR()
Toronto reference population by fiscal year (StatsCan 17-10-0009-01)
MORIE_TPS_TOTAL_CSI_WEIGHTS()
Total-CSI weights for the 9 TPS open-data categories
MORIE_TPS_VIOLENT_CSI_WEIGHTS()
Violent-CSI weights for the 9 TPS open-data categories
MaccsFingerprint() MolecularProperties() ReosFilter() MorganEnvironments() SaScore()
Cheminformatics filters on SMILES: MACCS keys, REOS alerts and synthetic accessibility
Maetst()
Mean absolute error of a set of predictions
Mafnpr()
The coordinates of a funnel plot, and the funnel itself
Mafrt()
Variance-stabilising double arcsine transform of a proportion
Mafrti()
Get a proportion back out of the double-arcsine scale
Mafsn()
How many missing null studies would sink a significant result
Magal()
Put every study on the same vertical scale before comparing them
Magsd()
Standardise by the control group's spread, not the pooled spread
Mahaldep()
Mahalanobis depth of each row of x
MajorityCompare() PivotPoints() ParetoSet() WinSet()
Spatial voting: majority rule, pivots, Pareto sets and win sets
MajorityTournament()
Majority tournament solutions
Mamh()
Mantel-Haenszel pooled odds ratio, given four parallel cell vectors
Manh2h()
Ask whether the direct evidence on one comparison agrees with the rest
ManifestoScales()
Left-right scales from Manifesto Project category percentages
Manlmm()
Borrow strength across a whole network of pairwise comparisons
MannKendall()
Mann-Kendall trend test
Manski()
Manski no-assumption bounds on the ATE
Manskif()
Manski worst-case bounds on a partially observed mean
Maorw()
How many missing studies would drag the effect down to trivial
MapEquation() InfomapPartition()
Community detection by the map equation
MapMet()
Mean average precision at k
MapProject() UtmZone() GeodeticToEnu() GreatCircleDistance() VincentyInverse()
Map projections, UTM zones, local tangent planes and geodesics
Mapeto()
Pool 2x2 tables when the events are rare enough to break the others
Marba()
The variance of a standardised effect when the two scores are paired
Mareg()
Explain between-study heterogeneity with study-level covariates
MarkCorrelation()
Mark correlation function
MarkDependenceTest()
Random-labelling test of mark dependence
MarkVariogram()
Mark variogram
MarshallEb() PotthoffWhittinghill()
Empirical-Bayes disease rates and the Potthoff-Whittinghill test
Martcons()
Cesaro-average Hellinger discrepancy of the predictive densities
Martingale() morie_survival_martingale()
Martingale residuals from a fitted Cox model
Matccd()
Estimate the odds ratio without ever estimating the matching sets
Matgame()
Value and optimal strategies of a zero-sum matrix game
Math(<morie_gr_dual>)
Elementary functions on dual numbers
Math(<morie_gvar>)
Elementary functions on reverse-mode tape nodes
Matrim()
Adjust a pooled effect for suppressed small studies
MaxPRegions()
Max-p regionalization
MaxentFeatures() MaxentFit() MaxentPredict() LocohHomeRange()
Species distribution and home range: MaxEnt features, fit and prediction; k-LoCoH isopleths
MaximalCovering()
Maximal covering location
McIntegrate() McStratified() McZonal() McControlVariate() McConvergence()
Spatial Monte Carlo estimation
McpHomeRange() DistanceSampling() OccupancyModel() NmixtureModel() CircuitResistance() LeastCostPath() ResistanceFromSuitability() HabitatSuitabilityIndex() PartialMantel() GeneFlowNm() HanskiConnectivity()
Wildlife ecology: home range, distance sampling, occupancy, abundance and connectivity
Mdppol()
Policy iteration for a finite MDP
Mdpval()
Value iteration for a finite MDP
MdsJackknife() MdsBootstrap()
Jackknife and bootstrap stability of a SMACOF solution
MeanExc()
Davison & Smith (1990) empirical mean excess over a threshold grid
MedCI()
Confidence limits for a product, without pretending it is normal
MedianLines() WeightedGameCore() SpatialHeart() QuotaSolution() MinimalRangeCoalition() RoemerPune()
Coalition games in the spatial model
Medint()
The part of the effect that needs mediation and interaction at once
Medmsm()
Direct and indirect effects from weighted marginal models
Mercerchk()
Mercer check: is a Gram matrix a valid kernel matrix?
Meta1l()
S-, T-, X- and R-metalearners of the CATE with OLS base learners
Meteor()
METEOR machine-translation metric (exact-match stage)
MgwrLocalT() BandwidthConfidenceInterval()
Inference for (multiscale) geographically weighted regression
Mhors()
Mantel-Haenszel pooled odds ratio across 2x2 strata
Mhrate()
Mantel-Haenszel summary incidence rate ratio
Middleout()
Middle-out reconciliation of a hierarchical forecast
Mirt2()
Compensatory multidimensional item response probabilities
Mirt3()
Three-dimensional compensatory MIRT, no guessing parameter
MissinM()
Pattern-mixture sensitivity analysis over a shift parameter delta
Misspecbd()
Worst-case bias bound under local misspecification
Mivbound()
Monotone instrumental variable bounds
Mktest()
Mann-Kendall rank test for monotone trend
MlFac()
Maximum likelihood factor analysis
Mlfit()
Gaussian ML log-likelihood of a linear mixed model at a given V
Mlloglik()
Maximum likelihood log-likelihood of the linear regression model
Mlpv()
Pseudo-R^2 at level 1: residual variance removed by the predictors
Mlwz()
Standardise a level-1 variable inside each cluster
Mnpenlik()
Penalized log-likelihood of the multinomial logistic model
Modlar()
Modularity Q of a community partition (alias of Sgtmodq)
Modulq()
Newman-Girvan modularity Q (alias of Sgtmodq)
Moetop()
Mixture-of-experts top-k routing with auxiliary load-balance loss
Momprior()
Check that a moment sequence is realisable by a measure on [0, 1]
MoranEigenvectorFilter()
Stepwise Moran eigenvector spatial filter
MoranEigenvectors() EigenvectorFiltering() GetisFilter()
Eigenvector spatial filtering
MoranPermutationTest() SpautolmFit() S2slsLag() GmErrorHet() SpatialJTest() SatorraBentler()
Spatial regression extras: Moran permutation test, spautolm, S2SLS lag and Durbin, KP-HET, J-test, Satorra-Bentler
MoranScatter()
Moran scatterplot coordinates and influence measures
Morieclrp()
Conditional p-value for the CLR statistic
MorphologicalOpening()
Morphological opening
Motfom()
FIMO-style position weight matrix scan
MothFlameOptimizer()
Moth-flame optimization
Mrr()
Rank-based score that only cares where the first hit lands
Mscmcl()
Impute the untreated counterfactual panel by nuclear-norm completion
Msetst()
Mean squared error of a set of predictions
Mskbnd2()
Manski no-assumption ATE bounds computed within covariate strata
Msm001()
Statistical learning model, systematic plus random part
Msm002()
Single-mean model for a one-way layout
Msm003()
One-way fixed-effects model
Msm004()
eq. (1.3) p.16 (re-export)
Msm005()
Reparameterized one-way model
Msm006()
One-way random-effects (mixed) model
Msm007()
Generalized precision
Msm008()
Generalized sensitivity and specificity
Msm009()
Brier score for categorical data
Msm010()
General univariate linear mixed model
Msm011()
Marginal likelihood of the linear mixed model
Msm012()
eq. (5.2) p.142 (re-export)
Msm013()
eq. (5.1) p.142 (re-export)
Msm014()
eq. (5.1) p.142 (re-export)
Msm019()
eq. (5.1) p.142 (re-export)
Msm026()
Multi-trait genomic linear mixed model
Msm027()
eq. (5.1) p.142 (re-export)
Msm028()
Multi-trait model with extra fixed effects
Msm029()
eq. (5.5) p.153 (re-export)
Msm030()
eq. (5.5) p.153 (re-export)
Msm031()
eq. (5.5) p.153 (re-export)
Msm042()
Normal linear regression under the Bayesian paradigm
Msm043()
Non-informative prior for the linear model
Msm044()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm045()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm047()
eq. (6.2) p.172 (re-export)
Msm057()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm058()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm059()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm060()
eq. (6.1)-(6.2) pp.172 (re-export)
Msm077()
eq. (6.2) p.172 (re-export)
Msm083()
eq. (1.2) p.15 (re-export)
Msm084()
eq. (1.2) p.15 (re-export)
Msm092()
Ordinal latent predictor with environment, markers and interaction
Msm093()
eq. (7.3) p.219 (re-export)
Msm097()
eq. (7.3) p.219 (re-export)
Msm098()
Ordinal predictor with environment and genetic effects
Msm099()
eq. (7.3) p.219 (re-export)
Msm101()
eq. (7.5) p.221 (re-export)
Msm102()
eq. (7.5) p.221 (re-export)
Msm103()
eq. (7.3) p.219 (re-export)
Msm109()
Penalized multinomial log-likelihood (ridge)
Msm111()
eq. (7.7) p.226 (re-export)
Msm114()
eq. (7.7) p.226 (re-export)
Msm115()
Lasso-penalized multinomial log-likelihood
Msm117()
eq. (7.7) p.226 (re-export)
Msm118()
eq. (7.7) p.226 (re-export)
Msm119()
eq. (7.10) p.227 (re-export)
Msm123()
RKHS optimization problem
Msm124()
eq. (8.1) p.253 (re-export)
Msm127()
eq. (8.1) p.253 (re-export)
Msm128()
RKHS estimation in the frequentist framework
Msm129()
eq. (8.3) p.254 (re-export)
Msm130()
eq. (8.3) p.254 (re-export)
Msm133()
eq. (8.3) p.254 (re-export)
Msm134()
eq. (8.3) p.254 (re-export)
Msm159()
eq. (1.2) p.15 (re-export)
Msm160()
eq. (1.2) p.15 (re-export)
Msm236()
eq. (1.3) p.16 (re-export)
Msm237()
eq. (1.3) p.16 (re-export)
Msm238()
eq. (1.3) p.16 (re-export)
Msm239()
eq. (1.3) p.16 (re-export)
Msm249()
Sum-of-squares loss
Msm262()
Basis expansion of the coefficient function (MVSML eq. 14.2)
Msm315()
eq. (1.2) p.15 (re-export)
Msm316()
eq. (1.2) p.15 (re-export)
Msm317()
eq. (1.2) p.15 (re-export)
Msm318()
eq. (1.2) p.15 (re-export)
Msm319()
eq. (1.2) p.15 (re-export)
Msm320()
eq. (1.2) p.15 (re-export)
Msm321()
eq. (1.2) p.15 (re-export)
Msm322()
eq. (1.2) p.15 (re-export)
Msm323()
Nonparametric links of the zero-altered Poisson forest
Msm324()
eq. (15.1) p.651 (re-export)
Msm325()
Zero-truncated Poisson splitting criterion
Msm326()
eq. (15.2) p.651 (re-export)
Msm327()
ZAP random-forest prediction
Msm328()
eq. (15.3) p.652 (re-export)
Msm329()
ZAPC random-forest prediction
Msm330()
eq. (15.4) p.652 (re-export)
Msm331()
eq. (15.4) p.652 (re-export)
Msm332()
Linear multiple regression fitted by OLS
Msm333()
eq. (3.1) p.71 with the OLS solution pp.72-73 (re-export)
Msm334()
Expected prediction error of the OLS fit
Mtlmmfit()
Multi-trait linear mixed model
Mtrbnd()
Manski-Pepper monotone treatment response bounds, either direction
Mtrbound()
Monotone treatment response bounds
Mtsbnd()
Monotone treatment selection bounds (alias of Mtsbound)
Mtsbound()
Monotone treatment selection bounds
Mtsmtv()
Intersection of the MTS and the MTR bound on E[Y(d)]
MuY()
Mean of the linear model output
MultM()
Specific and joint natural indirect effects through parallel mediators
MultiExp()
Multinomial theorem expansion
Multinom()
Multinomial coefficient
MultinomialDist()
Multinomial distribution
MuscleAlign() SumOfPairsScore()
MUSCLE-style multiple sequence alignment
Mutinf()
Mutual information of a 2-D joint pmf
MvNormDens()
Multivariate normal density
MvSkewNorm()
Multivariate skew-normal density
MvtDens()
Multivariate t density
Mznstep()
MuZero n-step bootstrapped value targets
Mzpuct()
MuZero pUCT action selection with min-max normalised values
Mzreanal()
MuZero Reanalyze targets and prioritised-replay weights
Mzrecur()
MuZero recurrent inference step
Mzvalue()
MuZero categorical value head and its invertible scaling
Mzworld()
MuZero world model: representation plus dynamics rollout
Naday()
Nadaraya-Watson kernel regression (alias of hrzk2)
Nadwat()
Nadaraya-Watson and local linear kernel regression (ESL eqs. 2.40-2.42)
Naivefc()
Naive forecast
Nakagami()
Nakagami distribution
NaoStationIndex() Co2CurveFit()
Climate indices and CO2 curve fitting
NaturalNeighbourWeights() NnInterpolate() NnGradientInterpolate() NnCrossValidation() NnInDomain()
Natural-neighbour interpolation (Sibson and Laplace coordinates)
Ndcg()
Normalised discounted cumulative gain at k
Nde()
Pearl's natural direct effect, estimated from a linear SEM
Neffsrs()
Effective simple-random-sample size of a weighted design
Negctc()
Fit the effect of D on a known-null outcome and test it for zero
NeighbourCardinality()
Neighbour counts and their frequency table
NelderMead()
Nelder-Mead simplex minimisation
Netattack()
Error and attack tolerance of a network
Netbtw()
Freeman betweenness centrality of a node
Netclocent()
Closeness centrality of a node (re-export)
Netdeg()
Freeman degree centrality of a node, normalised
Neteigcent()
Eigenvector centrality of a network (re-export)
Netparf()
Network attributable fraction with spillover
Newraf()
Newton-Raphson minimisation
NeymanScottProcess()
Neyman-Scott cluster process: moments and simulation
Ngppr()
Normalized gamma process prior (the Dirichlet process)
Niccgg()
Nakagawa-Schielzeth marginal R-squared for a random-intercept LMM
Nie()
Natural indirect effect (Pearl 2001)
Nignst()
Conjugate N-Inv-chi2 posterior update for a normal sample
Nndist()
Border-corrected nearest-neighbour distance CDF G(r)
Nnet1lay()
Single-layer feed-forward network as an adaptive basis expansion (ESL 2.45)
NormalScore() BackTransform() SgsSimulate() SisSimulate() SimulationSummary() SgsCrossValidation() TransitionMatrix() MarkovChainSimulate()
Sequential Gaussian and indicator simulation
Normlap()
Normalised Laplacian in Chung's sense
Novlt()
How surprising a recommendation is, in bits
Npbcl()
Posterior-mode partition of a Dirichlet-process normal mixture
Npbcox()
Cox regression with a gamma-process baseline hazard
Npbqr()
Quantile regression with a Dirichlet-process scale mixture
Npbsr()
Nonparametric Bayes survival via a beta process
Nprphet()
Additive forecast decomposition: trend, seasonality, autoregression
Nrgmwd()
Mean functional of a normalized random measure
Nrmprc()
Normalized inverse-Gaussian process
Nsamp()
Sample size for a stated half-width, with the finite-population step
Nucleolus()
Nucleolus and prenucleolus of a transferable-utility game
Nystromap()
Nystrom low-rank approximation of a kernel matrix
Objfair()
Individual fairness audit against a Lipschitz constraint
OceanChlorophyll() EuphoticDepth() VgpmProduction() Co2Flux() OxygenSolubility() PracticalSalinity() SplitWindowSst() SedimentTransport() OilSpillDrift() PlumeConcentration() DepthInvariantIndex() FloatingAlgaeIndex() MangroveVegetationIndex() BareSoilIndex()
Marine remote sensing and ocean physics
Ocmtmd()
Outcome-model diagnostic for a marginal structural model
OddsRat()
Cross-product odds ratio for a 2 x 2 table, with a Woolf interval
Oddsrat()
Odds ratio by Woolf's logit method (Woolf 1955) – NOT from Gibbons
Ogkcv()
Orthogonalized Gnanadesikan-Kettenring robust scatter
OlcAssembly() ProteinDisorder()
Read assembly and protein disorder
Olsfit()
Linear model fit by least squares (ESL eq. 2.6)
Olsnormeq()
Ordinary least squares through the normal equations
Omegah()
Share of total score variance due to the single general factor
OneMExp()
The (1 - x)^n to e^(-nx) step of the Poisson limit
OniIndex() PdoIndex() QboIndex() DegreeHeatingWeeks() CycloneEnergy() HurricaneTrack() HadleyEdge() CcScaling() SeaLevelSemiEmpirical() EmpiricalQuantileMap() BcsdDownscale() ProbabilityRatio()
Climate indices: ONI, PDO, QBO, degree heating weeks, cyclone energy, Hadley edge, scaling and downscaling
Ops(<morie_gr_dual>)
Arithmetic on dual numbers
Ops(<morie_gvar>)
Arithmetic on reverse-mode tape nodes
OptimalCuttingLines()
Roll-call analysis
Opttre()
Optimal treatment regime by exhaustive tree search
OrInt()
Odds ratio with an interaction term
OrdRep()
Ordered sampling with replacement
OrdSubs()
Ordered subgroups without repetition
OrderedLogis()
Ordered logistic distribution
Ordprobs()
Category probabilities of the ordinal threshold model
Otbar()
Average measures the way transport says they should be averaged
Otbarfree()
Barycentre whose support is found rather than fixed in advance
Otbarmap()
Barycentric projection of a transport plan
Otbreg()
Alternate KL projections of a Gibbs kernel onto the two marginals
Otcostlp()
l_p ground cost matrix
Otcostsq()
Squared-Euclidean ground cost matrix
Otcw()
Test whether a matching can be improved by re-shuffling a cycle
Otdiv()
Entropic transport cost with its own bias subtracted off
Otdwd()
Rescale a positive matrix to doubly stochastic form
Otemd()
Exact earth mover's distance between two histograms
Otentreg()
Entropic regularisation term of a coupling
Otfgw()
One coupling that has to satisfy the features and the structure at once
Otfreeen()
Primal-dual gap of the entropic OT problem
Otgws()
Couple two spaces that have no common ground metric
Otker()
Transport in a feature space, with the cost read off a kernel
Otlogpot()
Dual potentials from Sinkhorn scalings
Otmarsh()
Solve transport once part of the source marginal has been deleted
Otmcluster()
Lloyd's algorithm with transport in place of Euclidean distance
Otmd()
Ground cost that measures distance in units of the data's own spread
Otmm()
Average the transport cost over subsamples instead of solving once
Otmot()
Couple more than two histograms at once
Otmqd()
Distortion of a codebook, computed as transport to its atoms
Otmsw()
Take the worst direction rather than the average one
Otmxh()
Transport between mixtures, restricted to plans that stay Gaussian
Otnegent()
Discrete entropy of a coupling matrix
Ototk()
Value of the dual objective for a candidate pair of potentials
Otpr()
Transport only m units of mass and leave the rest in place
Otpushfw()
Push-forward of a density through a smooth bijective map
Otreg()
Dual potentials of the entropic transport problem
Otsd()
Sliced distance computed on a shared quantile grid
Otsinkh()
Entropic-regularised OT by Sinkhorn scaling
Otsinkit()
Iterations Sinkhorn needs to reach a marginal tolerance
Otsinktol()
Marginal violation of a coupling, in the sup norm
Otsobm()
Replace W_1 by a Hilbert norm on the difference of the measures
Otsoftas()
Soft assignment matrix from an entropic transport plan
Otsw()
Average the one-dimensional distance over many directions
Otunbal()
Transport between histograms of unequal mass
Otws()
Optimal transport cost on the line, which needs no solver
Otws2()
Wasserstein distance on the line, by sorting
Otwsg()
Wasserstein distance between Gaussians, without solving anything
OutMah()
Outliers by robust Mahalanobis distance
Outbrkdet()
Outbreak detection by online changepoint analysis of counts
Outmad()
MAD-median outlier rule
Outms()
Mean/standard-deviation outlier rule
Outsplit()
Split coordinates into outlier and non-outlier sets, bits allocated apart
Ovbias()
Omitted variable bias, classical and partial-R2 form
Ovbnk()
Oster bound on bias from omitted variables
Owltrn()
Outcome-weighted learning for an optimal treatment regime
PBCI()
Percentile bootstrap interval from ordered bootstrap values
PCenter()
p-center location
PMedian()
p-median location
PTukey()
Studentized range distribution function
Paa()
Piecewise aggregate approximation
Pagehink()
Page-Hinkley sequential test for a shift in the mean
Pagrk()
PageRank
Paligi()
ALiBi attention with per-head linear positional bias
PandInd()
And-rule for independent events
PanelBinaryChoice()
Panel binary choice models
PanelWithin() PanelResiduals() PanelVarianceComponents() CrossSectionDependence() UnobservedEffectsTest() BaltagiLiTest() PanelSerialTest() ConleyVcov()
Panel-data diagnostics
Paracompare() morie_survival_compare_parametric()
Compare parametric survival families by information criterion
Parasurv() morie_survival_parametric()
Parametric survival fit by maximum likelihood
Pareff()
Population attributable fraction (Levin)
PartisanGerrymanderMeasures() ElectoralSwing() DistrictCompetitiveness() Disproportionality() Malapportionment()
Partisan symmetry, swing, competitiveness and disproportionality
PartyNicheness()
Meyer and Miller (2015) nicheness of the parties in one election
PartyPositions()
Party positions
PartySystemIndices() PartyDivergence() RollcallMatrix() RollcallSummary() RollcallFilter()
Party systems and roll-call utilities
PascalId()
Pascal's addition rule
PatchMetrics() ClassMetrics() LandscapeMetrics()
Landscape metrics of categorical rasters (FRAGSTATS, landscapemetrics conventions)
PatchStructure() ClassStructure() ProximityMetrics() LandscapeInformation()
Further FRAGSTATS landscape metrics: shape, core, proximity and information theory
Pcadim()
Principal component compression of a marker matrix
Pcasnps()
EIGENSTRAT principal components of a genotype matrix
Pcfunc()
Pair correlation function g(r) from the derivative of Ripley's K
Pearsonr()
Sample correlation, its t test, and a Fisher-z interval
Pelt()
PELT changepoint detection (pruned exact linear time)
Permanova()
PERMANOVA pseudo-F from a distance matrix
Perplex()
Perplexity of a language model
Perturb()
Perturbation of one composition by another
Pettitt()
Pettitt's non-parametric single change-point test
PgSigmas() BriggsPlumeRise() GaussianPlume() GaussianPuff() AdvectionDiffusion2d() LagrangianParticles()
Atmospheric dispersion: Pasquill-Gifford sigmas, Briggs plume rise, Gaussian plume and puff, Eulerian and Lagrangian models
Pgrank()
Stationary importance of a node under a random surfer
Pheno2()
Normalise a phenotype, then flag what is still extreme
Phylog()
Root-to-tip regression dating (TempEst)
Phylotr()
Neighbor-joining phylogenetic tree (Saitou-Nei 1987)
Piepar()
Effect of shifting the exposure distribution, not eliminating it
PiidInt()
Intersection of k independent events of common probability
PivotedCholesky()
Pivoted (incomplete) Cholesky factorisation
Plncf()
Planck blackbody spectral radiance, wavelength form
PluralityCompetition()
Hotelling-Downs plurality competition on a line
Pmedex()
Indirect effect divided by an independently supplied total
PmfVar()
Variance of a discrete pmf
PnaAgg()
Principal Neighbourhood Aggregation (Corso et al. 2020, eq. 7)
PoisExactCI()
Exact Poisson interval
PoisGauss()
Gaussian limit of the Poisson distribution
PoisMean()
Mean of the Poisson distribution by its series
PoisMode()
Mode of the Poisson distribution
PoisNorm()
Poisson normalisation via the exponential series
PoisPeak()
Peak height of the Poisson distribution
PoisPmf()
Poisson probability mass function
PoisStirC()
Poisson-Stirling pmf in centred variables
PoisStirl()
Poisson pmf under Stirling's factorial approximation
PoisSum1()
The Poisson pmf sums to one
PoisVar()
Variance of the Poisson distribution by its series
PoisZero()
Poisson probability of no events
Poisdev()
Deviance and Pearson goodness of fit for a Poisson regression
Poisdir()
Pitman-Yor stick-breaking weights and the Gibbs factor V_{n,k}
Poislo()
Poisson loss for count outcomes
Poispen()
Penalized Poisson log-linear regression
Poispred()
Conjugate Poisson analysis with its negative-binomial predictive
PoissonGammaEb()
Poisson-gamma empirical Bayes relative risks
PoissonProcessFit()
Log-linear Poisson point process: Berman-Turner fit and simulation
PolarizationIndices() EstebanRayIndex() EarthMoversDistance() IssueConstraint() PolarizationTrend()
Polarization indices
PolarizationMeasures()
Polarization measures
PolicyMotivatedEquilibrium()
Equilibrium of two policy-motivated candidates under electoral uncertainty
PollardRho() LegendrePolynomials() ResolutionRefutation() PolarTransform() PanterDiteBound() LogitProportion() McStandardError()
Numerical and discrete algorithms
PolrFit()
Proportional odds model by maximum likelihood
PolygonBoolean() PolygonArea() ElevationProfile() ProximityBands()
Vector and raster geoprocessing
PolygonCompactness()
Polygon compactness
PolygonContiguity()
Contiguity neighbours of polygons
Polykern()
Polynomial kernel matrix
PopVar()
Population variance of a data set
PopulationDensitySurface()
Population density surface
Postrt()
Post-stratification as a weight adjustment
Poststs()
Post-stratified estimator of a population mean
PottsGibbs() PottsExact()
Potts and Ising lattice models
PowExpAp2()
Second-order (1+a)^n approximation
PowExpApx()
First-order (1+a)^n approximation
PowLogSer()
The (1+a)^n product expansion from the log series
PowerDist()
Power function distribution
PowerIndices()
Voting power indices
PowerLawField()
Gaussian field with a prescribed power spectrum by FFT filtering
PowerTTest() PowerPropTest() PowerAnova() CalculateInteractionPower()
Power analysis for t, proportion and ANOVA F tests
Powering()
Power a composition by a real scalar
Powsrv()
Power of a two-sided test under a complex survey design
Ppcrep()
Posterior predictive p-value comparing T(y, theta) to T(y_rep, theta)
Ppmean()
Posterior predictive mean, sd and interval from replicated datasets
Ppsamp()
PPS design quantities for a frame of units
Ppssamp()
Draw n units with probability proportional to size, and estimate
Pptest()
Phillips-Perron test for a unit root, trend included
Pptrend()
Phillips-Perron unit-root test with an explicit trend switch
Ppunit()
Phillips-Perron unit-root test
PrecK()
Precision at k
Predacc()
Genomic selection accuracy: Pearson correlation of observed and predicted
Predcomp()
Expected code length of a predictive model (the wrong-code bound)
Prefixev()
Evaluate a Polish-notation expression, right to left
Prehay()
Specific and total indirect effects with percentile bootstrap CIs
Prevratio()
Prevalence ratio
Prnkpg()
PageRank – alias of Pgrank
ProbabilisticVote() CandidateEquilibrium() HotellingPriceLocation() SalopCircle() KalaiSmorodinsky() BaronFerejohn() VoteTradingRikerBrams() PcaIdealPoints()
Probabilistic voting and candidate competition
ProbabilityKriging()
Probability kriging
ProcrustesFit() GeneralizedProcrustes()
Procrustes analysis (vegan procrustes and protest conventions)
ProcrustesOblique() MdsReflect() MdsFlip() MdsPolarity() MdsAnisotropy()
Oblique Procrustes rotation and configuration orientation checks
ProductVariance() WeibullMoments() FoldedNormal() Chisq1Cdf() HarmonicMeanEvidence() CrpsCdf() MaxEntropyDiscrete() BvLogisticSimulate() DdmDrift() KingKinship()
Probability toolkit: product variance, Weibull and folded-normal laws, evidence, CRPS, maximum entropy, EV simulation, DDM, KING
PropMd()
Share of the total effect that runs through the mediator
Propalloc()
Allocate n units to strata in proportion to stratum size
Propme()
Proportion mediated and mediated-to-direct ratio
Prtdid()
Goodman-Bacon partition of the two-way fixed-effects DiD
Pseudo()
Path-specific effect of x on y in a linear SEM
Pseudor2()
Pseudo coefficients of determination for a logistic regression
Psoop()
Particle swarm optimisation on a deterministic low-discrepancy stream
Ptmcmc()
Parallel tempering (replica exchange) MCMC
Ptnulltst()
Bayes factor for H0: p = p* against a nonparametric alternative
Ptotal()
Law of total probability
Pwpgt()
Prentice-Williams-Peterson conditional gap-time model
PwrRTest() CohenRMagnitude()
Power of the correlation test and Cohen's benchmarks
PysrRegression()
Symbolic regression with a Pareto front (PySR scheme)
QTukey()
Studentized range quantile
Qcritset()
Criterion-function set estimate for moment inequalities
Qlearn()
Tabular Q-learning on an explicit finite MDP
Qmds()
Empirical quantile-mapping bias correction (QUANT)
QnScale()
Rousseeuw & Croux (1993) Qn robust scale
Qrf()
Quantile (pinball) scoring function for point forecasts
QuadraticUtilityLagrange() QuadraticUtilityConstrained() VcgMechanism()
Utility maximisation under constraints and the VCG mechanism
QuantileRegressionLp() SpatialQuantileIv()
Quantile regression by linear programming and spatial two-stage quantile regression
R0()
Basic reproduction number R0
R0bayse()
Basic reproduction number – alias of R0
R2FTest()
F test that all slopes are zero, from R-squared
RadialBasis() RbfInterpolate() RbfLoocv() RbfMultiscale() RbfGrid()
Radial basis function surfaces
Radj()
Adjusted coefficient of determination for the linear model
Raklng()
Raking ratio estimation by iterative proportional fitting
RandW()
Random-walk graph kernel between two graphs
RandomPhaseField()
Random-phase spectral simulation of an isotropic Gaussian random field
RandomSpatialSample() HexagonalGridSample() AdaptiveClusterSample() QuadtreeGrid() VoronoiDeclusteringWeights() CellDeclusteringWeights() SpatialThinning() MapQualityIndices()
Spatial sampling designs and weights
Randres()
Recover a population rate from deliberately noised answers
Randwk()
Distribution of a simple random walk after a fixed number of steps
RankedProbabilityScore()
Ranked probability score
Ranksum()
Wilcoxon rank-sum test, normal approximation with a tie correction
RaoScott()
Rao-Scott corrections and the Thomas-Rao F test
Rasscale()
RAS matrix scaling to prescribed margins
RasterAggregate() RasterDisaggregate() RasterResample() ZonalStatistics() RasterMask() DistanceTransform() CostDistance()
Raster aggregation, resampling, zonal statistics, masks and distances
Ratioest()
Ratio estimate of a mean or total, using an auxiliary variable
RayleighDist()
Rayleigh distribution
Rbfk()
Radial basis (Gaussian) kernel
Rbfkern()
Gaussian (radial basis) kernel matrix
Rddmanip()
McCrary's test for a discontinuity in the density at the cutoff
Rdfzzy()
Fuzzy regression discontinuity: the Wald ratio at the cutoff
Rdkfp()
RDKit path-based (subgraph) topological fingerprint
Rdkkin()
Regression kink design: the ratio of slope changes at the threshold
Rdksrn()
Sharp regression discontinuity by local linear regression
Rdmcbw()
Plug-in MSE-optimal bandwidth for a sharp RD design
Rdpc()
Renyi differential privacy of the Gaussian mechanism
RedEdgePosition() ToaReflectance() FractionalVegetationCover() NdviEmissivity() LandSurfaceTemperature() ShortwaveAlbedo()
Red edge, reflectance, temperature and albedo conversions
Redcap()
REDCAP regionalization
Redund()
Redundancy of a source
Reffec()
Effective reproduction number from susceptible depletion
RegimeWeights()
Regime (block-diagonal) weights
RegularGrid() TriangularGrid() TransfiniteGrid() SystematicSample() SpaceTimeSample()
Grid generation and grid-based sampling
Reluact()
Rectifier linear unit activation and its gradient
Remlik()
Restricted (residual) maximum likelihood log-likelihood of a mixed model
Renent()
Renyi entropy of order alpha
Reportm()
Report Noisy Max
Resaln()
Resultant of two polynomials
RetestIQ()
IQ test-retest worked example
RetestR()
Test-retest correlation
RevSlope()
Reverse regression slope
RhoBounds()
Eigenvalue bounds on the autoregressive parameter
RhumbLine() GeodeticToEcef() EcefToGeodetic() HelmertTransform() BlockCvFolds() KmeansCvFolds() TemporalStratifiedSample() NestedGrid()
Geodesy and sampling: rhumb lines, ECEF and Helmert datum transformation, spatial CV folds, stratified samples, nested grids
RiceDist()
Rice distribution
Ridgeobj()
Penalized residual sum of squares of ridge regression
Ridgesol()
Closed-form ridge regression estimator
RischIntegration() SymbolicLimit() MatrixSymbolic() OdeSymbolic()
Symbolic calculus: limits, symbolic matrices, first-order ODEs and the rational Risch algorithm
Riskdf()
Risk difference between two proportions
Riskrt()
Risk ratio between two proportions
Rkhsbayes()
Bayesian kernel BLUP: the closed-form conditional mean of the kernel effects
Rkhsnorm()
Squared RKHS norm of a kernel expansion
Rmsetst()
Root mean squared error of a set of predictions
Rmst() morie_survival_rmst()
Restricted mean survival time
Rmstdiff() morie_survival_rmst_diff()
Difference in restricted mean survival time between two groups
Robcov()
Standard errors that survive the wrong variance assumption
RobinsonProject() WebMercator() MapUnproject() RotatedPole() RotatedGrid() NormalGravity() GeoidHeight()
Further map projections and geodesy
RobustLda()
Robust linear discriminant analysis
RoganGladen()
Prevalence with a misclassifying test
RollcallCohesion() PartyInfluence() LogitIdealPoints()
Roll-call analysis: cohesion and agreement, Snyder-Groseclose party influence, logistic ideal points
Ropedy()
Rotary position embedding rescaled to reach past the trained length
Rosenb()
Rosenbaum sensitivity bounds over a grid of Gamma
Rownorm()
Row-normalised spatial weights
Rrand()
The same mechanism, read as a differential-privacy guarantee
RtSi()
Cori et al. (2013) instantaneous reproduction number
Rtrenew()
Renewal-equation reproduction number with reporting delay
Rwlap()
Random-walk Laplacian L_rw = I - P, with P the transition matrix
SLXRegression()
SLX regression with impacts and a Wald test
STCovariance()
Space-time covariance models (gstat vgmST conventions)
STKriging()
Space-time kriging prediction and variance
STKrigingCV()
Leave-one-out cross-validation of space-time kriging
STVariogram()
Empirical space-time variogram on a full space-time grid
Sacc()
Soft policy iteration on an explicit finite MDP
Sacdet() Sacjac() Sacconv() Saclrt() Sacwald() Sacres() Sacimp() Sacrob() Sacvar() Sacboot()
SAC (SARAR) model diagnostics
SalvoExchange() BlottoPayoff() BlottoBestResponse()
Salvo model and Colonel Blotto games
SampMean()
Sample mean
SampR()
Sample correlation coefficient
SampVar()
Unbiased sample variance
SampVarVar()
Variance of the sample variance
SampfordDesign()
Sampford's unequal-probability sampling without replacement
SampleLmoments() FloodFrequency() LowFlowFrequency() FlowDurationCurve()
Flood, low-flow and flow-duration frequency analysis
SampleVariogram()
Sample variogram (gstat variogram conventions)
SampleVariogramNd() AnisotropicLag() ZonalSemivariance() VariogramEnvelope() VariogramJackknife() VariogramCloudBox() VariogramFractal() WindowedSemivariance()
Variogram extras
SarPoisson() SarNegbin() SarZip() SarZinb() SarPoissonLmTest() CountModelIc() BymVarianceFraction()
Spatial count regression
SarProbitGibbs() SarTobitGibbs() SarOrderedProbitGibbs() SpatialBayesGibbs()
Bayesian spatial autoregressive models by Gibbs sampling
Sardet() Sarjac() Sarlrt() Sarwald() Sarr2() Sarfilt() Sarres() Sarsc() Sarimp() Sarspil() Sarsim() Sarvar() Sarboot()
Spatial lag (SAR) model diagnostics
Sarsa()
Tabular SARSA on an explicit finite MDP
SavingsRoutes() TripGeneration()
Vehicle routing extensions and trip generation
SaxtonRawls() VanGenuchten()
Soil hydraulic pedotransfer functions and retention curves
Sbcrank()
Rank statistics for simulation-based calibration, and a uniformity test
ScanZones() KulldorffScan() BesagNewell() TangoTest() StoneTest()
Spatial cluster detection: circular scan, Besag-Newell, Tango and Stone
Scanstat()
Kulldorff spatial scan statistic
Scbsft()
Semiparametric-efficient treatment effect adjusting for baseline
Scdisp() Scnblrt() Scpboot() Scpflx()
Spatial count model tests
ScheffeCI()
Scheffe interval for a contrast
Schoenfeld() morie_survival_schoenfeld()
Schoenfeld residuals and the proportional-hazards test
Scoredist()
Distortion of an inner-product score under TurboQuant_prod
Scoretest()
Score (Rao) test of H0: p = p0 for a binomial proportion
SdAvgBin()
Standard deviations of a binomial total and its average
SdBinom()
Standard deviation of a binomial count
SdCoinSum()
Standard deviation of a fair-coin Heads count
SdFromVar()
Standard deviation from a variance
SdIidSum()
Standard deviation of a sum of n i.i.d. variables
SdSum()
Standard deviation of a sum of independent variables
SdXbar()
Standard deviation of the sample mean
Sdcdis()
Geomasking: spatial data distortion for privacy protection
SdemML() GnsML() CarML() SpatialLrTest() SpatialWaldTest() ResidualMoran() LogJacobian()
Spatial Durbin error, general nesting and CAR regression with tests
SdmML() BreuschPagan() SpatialBPTest()
Spatial Durbin ML with spillover indices, and Breusch-Pagan tests
Sdmdet() Sdmjac() Sdmconv() Sdmlrt() Sdmwald() Sdmcf() Sdmr2() Sdmflt() Sdmwx() Sdmolsi() Sdmres() Gnsres() Sdemres() Sdmvar() Sdmboot()
Spatial Durbin (SDM) model diagnostics
SegregationEvenness()
Segregation evenness: Theil, Atkinson and Gini
Seiarp()
SEIRA: SEIR with a parallel asymptomatic infectious compartment
Seirep()
SEIR compartmental model with an exposed (latent) class
SemiparKernels()
Object-style wrapper for the semiparametric kernel toolkit
Semjac() Semconv() Semlrt() Semwald() Semflt() Semres() Semlm() Semsc() Semspec() Semvar() Semboot()
Spatial error (SEM) model diagnostics
Semsro()
SEM residual covariance matrix and its summary fit indices
Sepcons()
Hellinger-affinity bound from strong delta-separation at stage k
SequentialInhibition()
Simple sequential inhibition process
SequentialLinearProgramming()
Sequential linear programming
SequentialQuadraticProgramming()
Sequential quadratic programming
SerialCorrelation() LmmSerialCovariance() LmmSerialLoglik() LmmSerialFit()
Linear mixed model with serial correlation and measurement error
ServR()
Serendipity of a recommendation list
ServiceCoverage()
Service coverage
SetCoveringLocation()
Location set covering
Sfbnds()
Balke-Pearl sharp bounds on the average causal effect under an instrument
Sgntest()
Exact sign test of H0: median = md
SgsBlockSimulate() ConditionalEnsemble() PfieldSimulate() LmcConditionalSimulate() CollocatedCosimulate() SisMarkovBayes() SnesimSimulate()
Geostatistical simulation: SGS with block data, ensembles, p-field, LMC and collocated co-simulation, SIS, SNESIM, annealing
Sgtadj() Sgtnbe()
Adjacency and non-backtracking matrices of a graph
Sgtcheegerbound()
Exact Sgtcheegerbound constant, with the eigenvalue bounds it satisfies
Sgtcheegerconstant()
Sgtcheegerconstant constant by a sweep over the Fiedler vector
Sgteigcent()
Eigenvector centrality from the leading eigenvector (re-export)
Sgtgrn()
One symmetric-normalised graph convolution
Sgtlap2()
Laplacian eigenmaps: embed a graph in k dimensions
Sgtleid()
One Leiden refinement pass over an existing partition
Sgtmix()
Mixing time of a random walk from the absolute spectral gap
Sgtmodq()
Newman-Girvan modularity Q of a labelled partition
Sgtpgr()
PageRank by power iteration – alias of Pgrank
Sgtrwk()
Random-walk kernel of a graph as a resolvent
Sgtsbnd()
Kesten-Stigum detectability threshold for the symmetric SBM
Sgtsck()
Ng-Jordan-Weiss k-way spectral clustering
Sgtwlk()
Refine node colours until neighbourhoods stop distinguishing them
Shanent()
Shannon entropy of a discrete distribution
ShapleyOwen()
Shapley-Owen value
Shewh()
Shewhart control chart: the three-sigma decision, and what it costs
Shfflm()
Privacy amplification by shuffling: local DP to central DP
Shfrm()
Shared gamma frailty model with marginal (population-averaged) output
ShiftSchedule() ReliefFactor() WorkloadStaffing()
Shift scheduling, relief factors and workload staffing
ShortestPath() KShortestPaths() TspTour()
Shortest paths, k-shortest paths and travelling salesman tours
ShortestPathLengths() Centralities() NetworkSummary() ModularityScore() NetworkConnectivity() NodeVulnerability()
Network measures (igraph conventions)
Siaepi()
Network SIR epidemic, individual-based mean field
Sieg()
Siegel repeated-median line: the 50 percent breakdown robust regression
Siepid()
Network SI epidemic, individual-based mean field
Sietrt()
Network SIS epidemic, individual-based mean field
Sigbasis()
Sigmoid basis transformation of a design matrix (ESL eq. 2.31)
Siglip()
Contrastive loss that scores each pair on its own
SilhouetteWidths() DunnIndex()
Silhouette widths and Dunn index
SineCosineAlgorithm()
Sine cosine algorithm
Singgw()
Single-step relationship matrix H (ssGBLUP)
Singsd()
Singular spectrum analysis of a univariate series
SinhArcsinh()
Sinh-arcsinh distribution
Sinkdist()
Dual-Sinkhorn divergence between two discrete measures
SinkhornWeights()
Doubly-stochastic (Sinkhorn) scaling of spatial weights
Sirepi()
SIR compartmental model by fourth-order Runge-Kutta
Sirstn()
Stochastic SIR by Gillespie's direct method
Sirtdy()
Age-structured SIR driven by a social contact matrix
Skater()
SKATER regionalization
Slope1()
Slope One and Weighted Slope One collaborative-filtering predictors
SlopeProd()
Product of the forward and reverse regression slopes
Slxwx() Slxflt() Slxres() Slxboot()
Spatial lag of X (SLX) model diagnostics
SmacofIndDiff()
Three-way SMACOF (INDSCAL, IDIOSCAL, replicated MDS)
SmacofMds()
Symmetric SMACOF multidimensional scaling
SmartsMatch() ClogpEstimate() PainsFilter()
SMARTS search, Crippen logP and PAINS alerts
SmilesMolecularWeight() SmilesHba() SmilesHbd() SmilesRotatableBonds() SmilesTpsa() LipinskiDescriptors()
Molecular descriptors from SMILES
Smplqc()
Per-sample genotype quality control
Smrind()
Standardised mortality ratio, indirect standardisation
SmtSolver() ShorFactoring()
Decision and factoring algorithms
SnScale()
Rousseeuw & Croux (1993) Sn robust scale
Snaivefc()
Seasonal naive forecast
Snmlin()
G-estimation of a linear structural nested mean model
Snpblr()
SNP-BLUP additive genomic prediction
Snpblup()
SNP-BLUP (ridge regression BLUP) marker effects and breeding values
Snr2()
Snijders-Bosker level-1 explained variance
Snr2u()
Snijders-Bosker level-2 explained variance
Sntmn()
Mandatory minimum sentence analysis
Socpts()
Second-order cone programming by the barrier method
SoilChemistry() SoilCarbon() UsdaTexture() SobelFilter()
Soil chemistry, carbon, texture and Sobel filtering
SpPanelDynamic()
Dynamic spatial panel (spatial ARX) on the fixed-effects spatial lag model
SpaceTimeInteractionTest()
Monte Carlo test of space-time interaction
SpaceTimeK()
Space-time K function of Diggle, Chetwynd, Haggkvist and Morris (1995)
Sparseattn()
Sparse (masked) scaled dot-product attention
SpatialAccessibility()
Spatial accessibility
SpatialBargaining()
Spatial bargaining
SpatialConcentration()
Spatial concentration indices
SpatialCorrelogram()
Spatial correlogram over neighbour-graph lag orders
Sglm() Sgcrh() Sglss() Sgrwn()
Spatial GLM, robust semivariogram, loss and weight normalisation
SpatialGlmmFit() SpatialGlmmPredict() GlmmResiduals() CrpsGaussian() CrpsPoisson() CrpsSample()
Spatial GLMM fitting, prediction, residuals and scoring
SpatialImpacts()
Direct, indirect and total impacts of a spatial lag or Durbin model
SpatialKde()
Bivariate Gaussian kernel density of a point pattern
SpatialPanelMl() SpatialPanelReLag() InformationCriteria()
Spatial panel data models
SpatialProbit() SpatialLogit() SpatialZip() SpatialPoisson() SpatialPanelFe() SpatialPanelRe()
Spatial probit, logit, Poisson, ZIP and panel models (entry points)
SpatialRegressionML()
Spatial lag, spatial error and SAC models by maximum likelihood
SpatialTwoStageLS()
Spatial two-stage least squares for the spatial lag model
SpatialWeights()
Spatial weight matrix from point coordinates
Spatrend()
Spatial trend surface: linear mean plus correlated error
Specclus()
Spectral clustering: embed by the bottom eigenvectors, then k-means
SpectralGRF()
Gaussian random field simulation by circulant embedding
SpectralIndex()
Spectral indices of reflectance bands
Spmi()
Simultaneous pairwise marginal independence (SPMI)
SprawlEntropy()
Sprawl entropy
Srfintp()
Interpolate a scattered surface onto a grid by GP regression
Srstotal()
Estimate a population total from a simple random sample
Sscompv()
Wolbers concordance for competing-risks predictions
Ssello()
Sum-of-squared-error loss for continuous outcomes
Ssintc()
Nonparametric survival when each event time is only bracketed
Sstrlf()
Left-truncated survival adjustment
StCokriging() DiffusionStCovariance()
Space-time cokriging and the diffusion covariance
StFit() StUniversalKriging() StLocalKriging() StBlockKriging() StLeaveHOut() StKrigingDiagnostics() StSmoothness() StPredictGrid() StSimulate()
Fit a space-time variogram model and space-time kriging variants
StGetisOrd() BivariateMoran() StTrendSurface()
Space-time Gi*, bivariate Moran and space-time trend surfaces
StLag() StAcf() StPacf() StarFit() StarmaFit() StarmaForecast() StPortmanteau()
Space-time ARMA models: STACF, STPACF, STAR and STARMA fits, forecasts, portmanteau test
StModelVariogram() StCovarianceFamily() StLinearCombination()
Space-time variograms and covariance families
StarBRec()
Stars-and-bars recursion
StarBars()
Stars and bars
Stbciw()
Stabilized inverse-probability-of-censoring weights
Stratdes()
Allocate a stratified sample and report the variance it achieves
Stratmean()
Stratified estimate of the population mean, with its variance
Strdis() structural_distance()
DeltaCon structural distance between two graphs
StreamOrder() TopographicWetnessIndex() StreamPowerIndex()
Stream order and topographic indices
StreamSegments() ChannelSlope() MeanderMetrics() DarcyFlow() BreachDepressions() HeightAboveDrainage()
Stream networks, channel form, groundwater flow and depression breaching
StripMean()
Strip mean from the reverse regression line
Strtwt()
Stabilized inverse-probability-of-treatment weights within strata
Stsmod()
Linear Gaussian state-space model: Kalman filter and smoother
Studrs()
Residuals rescaled by a variance the point itself did not inflate
Subcomp()
Form the subcomposition on a selected subset of parts
Suffstat()
Sufficient statistics for the Bernoulli and Normal models
SumDens()
Convolution density of a sum
SumDensP()
Strip probability for a sum density
SumInts()
Sum of the first N integers
Superlrn()
Weight candidate predictions by cross-validated risk, on the simplex
Surpris()
Surprisal (self-information) of one or more outcomes
Survbri()
Brier score for survival prediction
Survci2()
Uno C-index for censored data
Survip()
Design-corrected p-value for a naively computed chi-square statistic
Survipa()
Index of prediction accuracy (scaled Brier score)
Survlnk()
Discrete-time survival regression with a chosen hazard link
Survrls()
Restricted mean survival time over a fixed horizon
Survtdc()
Truncated time-dependent concordance index
Svariog()
Sample (empirical) semivariogram
Svmep()
Epsilon-insensitive support vector regression
Svmhp()
Maximum margin (hard margin) hyperplane
Svmsl()
Support vector classifier with slack variables (soft margin)
Svmwolfe()
Wolfe dual objective of the support vector machine
Svymed()
Survey median
Svyqtl()
Survey quantile by inversion of the weighted CDF
Svytbl()
Weighted two-way table with a design-corrected test of independence
swiglu()
SwiGLU feed-forward block
Swinmw()
Swin window multi-head self-attention with relative position bias
SymbolicIntegrate() SymbolicDiff()
Symbolic integration and differentiation
Sysamp()
Every k-th unit: all k systematic samples and the exact variance
Sysrs()
Draw one systematic sample with a random start, and estimate from it
TasseledCap() BandPca() MnfTransform() PanSharpen() TopographicCorrection() EstimateHaze() RadiometricCorrection() CloudMask() CloudShadowMask() SpectralAngleClassify() GaussianMlClassify() KmeansClassify() AtgpEndmembers() FparFromNdvi() Tvdi()
Multispectral image processing (RStoolbox conventions)
Taxass()
Kraken-style taxonomic classification by RTL path scoring
TeachingLearningOptimizer()
Teaching-learning-based optimization
TerrainIndices()
Terrain derivatives of a DEM (terra terrain conventions)
Testcond()
Check the three conditions that deliver a posterior contraction rate
Tfcells()
Cell counts N_epsilon for a tail-free or Polya-tree partition
ThinPlateSpline()
Thin-plate spline interpolation and smoothing in two dimensions
Thomp()
Beta-Bernoulli Thompson sampling
Tldepl()
Lower tail dependence coefficient
Tldepu()
Upper tail dependence coefficient
TmlMd()
Natural direct and indirect effects, both targeted
Tmlbas()
TMLE whose initial outcome model uses baseline covariates only
Tmldis()
How much of a group gap survives equalising the covariates
Tmleboot()
Nonparametric bootstrap interval for the targeted risk difference
Tmlecat()
Target E[Y_a] at every level of a categorical treatment
Tmlecde()
Controlled direct effect: the treatment effect with the mediator fixed
Tmleinf()
Standard error, interval and score check from an influence curve
Tmleor()
Targeted marginal odds ratio, with inference on the log scale
Tmleqs()
How far the initial fit was from solving the efficient score equation
Tmlerd()
Targeted estimate of the marginal risk difference E[Y_1] - E[Y_0]
Tmlestab()
Stabilize a targeted estimate by truncating the propensity score
Tmlevar()
Target the variance parameter sigma^2 = E[D*^2] and bound it
Tmlfed()
Pool site-level TMLEs without moving any row between sites
Tmlhrz()
TMLE for the marginal hazard ratio when proportional hazards fails
Tmlitr()
TMLE for the value of the estimated optimal individualized rule
Tmlmct()
TMLE for a vector-valued (multivariate) binary treatment
Tmlmda()
TMLE for the ATE with a missing-at-random outcome
Tmlmlt()
TMLE for a multi-arm treatment: arm means and pairwise contrasts
Tmlmnl()
Cross-fitted TMLE with pluggable machine learners for Q and g
Tmlmpc()
TMLE for a multi-state cause-specific cumulative hazard contrast
Tmlmpi()
TMLE for the marginal probabilistic index
Tmlmrk()
TMLE for the long-run value of a policy in a finite Markov decision process
Tmlnde2()
Direct effect with the mediator drawn from a fixed reference arm
Tmlnsm()
TMLE for a non-smooth functional: the counterfactual median difference
Tmlnte()
Total effect by TMLE, with the mediator held out of the model
Tmlper()
Point-treatment TMLE with seasonality in both nuisance models
Tmlphd()
High-dimensional TMLE with L1-penalised nuisance models
Tmlpse()
TMLE for a path-specific effect through a chosen subset of mediators
Tmlqlc()
Backward-targeted Q-learning for a multi-stage treatment regime
Tmlrct()
RCT-assisted TMLE for the trial-population ATE
Tmlrec()
TMLE for the marginal recurrent-event rate ratio
Tmlres()
TMLE with an estimated second-order remainder
Tmlric()
Targeted maximum likelihood for a rare binary outcome
Tmlsbg()
TMLE for the average treatment effect inside a named subgroup
Tmlsbs()
Sample-split TMLE on a data-adaptively selected covariate subset
Tmlspl()
TMLE for a direct effect under interference, at a fixed network exposure
Tmltrn()
TMLE transporting a treatment effect to a target population
Tmscore()
Structure similarity whose scale does not drift with chain length
Topdown()
Top-down disaggregation of a hierarchical forecast
Tqdist()
Smallest sketch size meeting an inner-product distortion target
Tqhs()
Quantize a key embedding to one bit per sketch row
Tqmom()
The l-th absolute moment of a zero-mean normal
Tqorth()
Replace a Gaussian sketch by one with orthonormal rows
Tqrot()
Draw a rotation that spreads outlier energy over all coordinates
TrackSteps() MovementNetwork() CorePeriphery() NetworkRobustness() MovementHmm() CrwKalman()
Animal movement and spatial networks
TrajectoryMetrics() MeanSquaredDisplacement() FirstPassageTime() SimulateWalk() OdMatrix()
Movement trajectory analysis
TransformedField() MaxStableField() AnisotropicCoords()
Non-Gaussian random fields
TransportationProblem()
Transportation problem
TravellingSalesman()
Travelling salesman tour
Trcwgt()
Truncated product of treatment and censoring weights
Treedepth()
How often the NUTS trajectory hit the tree-depth cap
TrimCI()
Tukey-McLaughlin inference for a trimmed mean
TrimSE()
Standard error of the trimmed mean
Trimit()
Weight trimming with the excess redistributed
TripNoRep()
Ordered triples without repetition
Trmwgt()
Weight truncation at a percentile of the weight distribution
TruncatedProductPvalue() WilcoxonSensitivityMoments() SubmaxComparisons() SubmaxTest()
Effect modification in matched observational studies
Tsallen()
Tsallis entropy of the empirical distribution of a sample
Tsalls()
Tsallis entropy of a probability vector that is already known
TukeyKramer()
Tukey-Kramer intervals for all pairwise differences
TukeyLambda()
Tukey lambda distribution
Tukeyw()
Biweight M-estimate of location, with redescending weights
Tukrho()
The biweight loss and its derivative, evaluated pointwise
Tukrr()
Robust regression by iteratively reweighted least squares
Turnbull() morie_survival_turnbull()
Turnbull estimator for interval-censored data
TurningBands()
Turning bands simulation of a Gaussian random field
TurningBandsSpherical() DlaAggregate() MovingLeastSquares() DeformationFieldSimulate() AnnealingSimulation()
Spatial simulation and interpolation
Tvsbn()
Asymmetric set similarity with separate penalties per side
TwoCoinVar()
Variance of the sum of two fair coin flips
Twostage()
Two-stage sample: PSUs drawn, then elements within each PSU
Twostg()
Cheng-Wei-Ying two-stage transformation-model estimator
Ucbb()
UCB1 index policy on a fixed reward table
UhiIntensity()
Surface urban heat island intensity
Unitl()
Unit-length (L2) normalization
Unobts()
Unobserved components (basic structural) model by the Kalman filter
Vaccthresh()
Critical vaccination threshold for herd immunity
Vaean()
Anomaly detection by VAE reconstruction probability
Vaeber()
Variational autoencoder evidence lower bound (SGVB estimator)
Vaecf()
Multinomial variational autoencoder for collaborative filtering
VandIE()
The four-way decomposition expressed as shares of the total
Vanr1()
VanRaden method 1 genomic relationship matrix
Vanr2()
VanRaden method 2 genomic relationship matrix (marker weighted)
VarF()
VAR(p) multivariate autoregression – alias of Varest
VarSum()
Variance of a sum of independent variables
VarXbar()
Variance of the sample mean
Varatr()
Value at Risk and expected shortfall from a GARCH(1,1) volatility
Vardec()
VAR forecast error variance decomposition – alias of Fevdc
Varest()
VAR(p) vector autoregression by multivariate least squares
Vargpc()
Scalable variational Gaussian process classification (SVGP)
VariationRatio() YuleAssociation() TostCorrelation() AffineMoments()
Association measures and affine moments
Varimp()
VAR impulse response function – alias of Irfun
VariogramLoglik() Likfit() SelectVariogramModel()
Gaussian log-likelihood and ML/REML fitting of a covariance model (geoR likfit)
VariogramMap()
Variogram map
Varrd()
Variance reduction criterion for regression tree splitting
Vbinfp()
Barber-Agakov variational lower bound on mutual information
Vbnopt()
Variational inference by ELBO maximisation – alias of Vinfer
Vbnpc()
Variational Bayes for a Dirichlet process mixture (truncated stick-breaking)
Vcquant()
Quantize a value cache with the inner-product variant of TurboQuant
VecchiaLoglik() NngpPredict() TaperedKriging() SparseGpKrige() FixedRankKriging()
Scalable approximations to kriging
VehicleRoutingSavings()
Vehicle routing by Clarke-Wright savings
VgmSemivariance() VgmCovariance() VgmCorrelogram()
Variogram models (gstat vgm shapes and more)
VgmSpectralDensity()
Spectral density of Matern, exponential and Gaussian covariances
Vgrm() variogram()
Empirical (Matheron) variogram
Vilbrt()
ViLBERT two-stream co-attention
Vinasc()
Score a docked pose with the Vina free-energy function
Vinfer()
Mean-field variational inference by coordinate ascent on the ELBO
Virtloss()
Virtual loss for parallel Monte-Carlo tree search
Viterb()
Most likely hidden state sequence, in one forward pass
Vitlnorm()
Layer normalisation
Vitscn()
Scaled cosine attention (Swin Transformer V2)
Vivkt()
Show how the classical two-way split sits inside the four-way one
VmfDens()
Von Mises-Fisher density
Volsv()
Quasi-likelihood SV(1) via the Kalman filter
VoronoiCells()
Voronoi cells of a point pattern inside a convex window
VoteProbability()
Spatial vote probabilities
VoteShares() BestResponseEquilibrium() StrategicVoteShares() EntryGame() EffectiveNumberParties() RubinsteinBargaining() MedianParty() LaverDynamics() MergeSplitParties() SetterOutcome() CommitteeOutcome()
Party competition: vote shares, Hotelling-Downs equilibria, strategic voting, entry, bargaining, committees
VoterUtility()
Spatial voting utilities
Vrmed()
Fraction of explained variance attributable to the mediator
Vstrength()
Vertex strengths of a weighted graph
Waicd()
Predictive criterion computed from the posterior, pointwise
Waldstat()
Wald test of H0: theta = theta0 against a two-sided alternative
Wassdt()
1-Wasserstein distance on the line
Watstro()
Rewire a ring lattice and watch the diameter collapse
Wave()
Daubechies orthonormal wavelet basis for a periodic signal
Weibull3()
Three-parameter Weibull distribution
WeibullFrailtyFit() SpdePrecisionGrid()
Spatial survival and SPDE fields: Weibull gamma-frailty model and SPDE (Matern) GMRF precision
WeightInit() Xavir() Xvrig()
Neural network weight initialisation (Philox)
WeightsStyle()
Spatial weights coding schemes (spdep nb2listw styles)
WeightsSummary()
Summary of a spatial weights matrix
Weisz()
Iteratively reweighted mean converging on the geometric median
Welshw()
Gaussian-shaped weight that decays smoothly and never reaches zero
Wfrep()
Weighted frequency distribution
Wgtlap()
Assemble the weighted Laplacian from an edge list
WhaleOptimization()
Whale optimization algorithm
WideD()
Wide & Deep jointly trained classifier
Winz()
Mean after pulling the tails in to the quantiles
WishartDens()
Wishart and inverse Wishart densities
WishartMoments() PartitionedCovariance() SeparablePrewhiten() NormalGammaDlm() HarmonicOzoneDlm() CarrollStCorrelation() ProcessConvolutionCovariance() ArmaAcf()
Spatio-temporal model building blocks
Wlwmm()
Wei-Lin-Weissfeld marginal model for multivariate failure times
Wmeansr()
Horvitz–Thompson weighted (Hajek) survey mean
Wmtwgt()
Spatial weights matrix from point coordinates
Wordscores()
Wordscores
Wpiece()
WordPiece subword tokenizer
WrapCauchy()
Wrapped Cauchy distribution
WrapNorm()
Wrapped normal distribution
Wsdt2d()
Transport distance between equal-size clouds by optimal assignment
Wvar()
Weighted variance and weighted mean
Wvltdb()
Multi-level Daubechies wavelet decomposition of a periodic signal
Xpehh1()
Cross-population extended haplotype homozygosity (XP-EHH)
Yangr()
Yang et al. realized genomic relationship matrix
Yarn()
YaRN context-window scaling: NTK-by-parts + ramp + temperature
Yolk()
Yolk of a spatial majority game
Yuen()
Yuen's test for two trimmed means
Zaurts()
Zivot–Andrews unit root test with an endogenous break
Zcdp()
Zero-concentrated differential privacy (zCDP) accounting
Zfm()
Z-transform of a discrete-time sequence
ZipGibbs() KernelRelativeRisk() OdenIpop() ProspectiveScan() PoissonEcological() ArealWombling() BufferRateRatio() NeedBasedAllocation() FunnelControlLimits() GhoseDrugFilter()
Spatial epidemiology: ZIP Gibbs, kernel relative risk, Oden Ipop, prospective scan, ecological regression, wombling
Zscnm()
Z-score (standardization) normalization
ZscoreA()
Z-score anomaly flagging
Zxscv() Zxsbu() Zxsbv() Zxsls() Zxsle() Zxsqr() Zxsrf() Zxsbg() Zxsgb() Zxsvm() Zxsen() Zsglm()
Spatial machine learning with coordinate features
abc_gp_emulator()
ABC with a GP surrogate, four methods
accpln()
Smallest binomial single sampling plan for two risk points
accqlv()
Quality levels and average outgoing quality of a sampling plan
adjust_p_values()
Convenience dispatcher for p-value adjustment methods
admod()
Additive model by marginal integration
agent()
Ask the rmorie terminal agent
agent_available()
Is the rmorie CLI agent available?
aggregate_att()
Aggregate ATT(g,t)
airl()
Adversarial Inverse Reinforcement Learning
all_stat_command_names()
Sorted vector of all command names + aliases
analyze_doob_full_affidavit()
Replicate Doob's full Federal Court affidavit (Tables 1-3)
analyze_doob_table1_releases()
Analyse Doob Affidavit Table 1 – 5-year average annual releases
analyze_doob_table2_flow()
Analyse Doob Affidavit Table 2 – prisoner flow
analyze_doob_table3_age_overrepresentation()
Analyse Doob Affidavit Table 3 – age over-/under-representation
anderson_darling()
Anderson-Darling goodness-of-fit test
anova_table()
ANOVA table from a fitted model
apre_statistic()
Aggregate proportional reduction in error (APRE)
arsau
ARSAU dataset loaders + registry (R-side mirror of morie.arsau_datasets)
arsau_analyze
Per-record-type ARSAU analysis pipelines (R-side mirror of morie.arsau_analyze)
arsau_datasets
ARSAU CKAN sidecar helpers + tidy registry view (R-side companion to morie.arsau_datasets)
assess_calibration()
Comprehensive calibration assessment for binary outcomes
assess_discrimination()
Discrimination assessment for binary classifier
audit_variables
Comprehensive per-variable audit walker (R-side mirror)
aurroc() glmpoi() kmeans2() rdgr()
AUC, Poisson GLM, k-means and ridge with verbose results
auto_test()
Automatic test selection
bartlett_test()
Bartlett's test for equality of variances
bayesian_fmi()
E-BFMI: energy Bayesian fraction of missing information
bcppcc()
Box-Cox lambda by the probability plot correlation
benjamini_hochberg() bh()
Benjamini-Hochberg FDR control
benjamini_yekutieli() by_fdr()
Benjamini-Yekutieli FDR control under arbitrary dependence
bernoulli_variance() binomial_expansion() binomial_pmf_vector() binomial_variance() classify_events() conditional_from_joint() conditional_subset() density_expectation() gaussian_approx_2n() gaussian_approx_n() gaussian_approx_biased() gaussian_sum_density() hockey_stick() hypergeometric_pmf() partial_permutations() permutations_count() poisson_binomial_peak_ratio() poisson_mean_rate() poisson_small_interval() poisson_zero_series()
Elementary probability results of Morin (2016)
bias_adjusted_estimate()
Bias-adjusted treatment effect (Ding & VanderWeele 2016)
bic_posterior_probs()
Posterior model probabilities from BIC
bivariate_morans_i()
Bivariate Moran I between two variables
bkelim()
Backward elimination by the partial F statistic
bkrnig()
Bayesian kriging with a normal-inverse-gamma prior
block_bootstrap()
Block bootstrap for dependent / time-series data
bnappx()
Normal approximation to the binomial distribution function
bonferroni()
Bonferroni FWER correction
bootstrap()
Nonparametric bootstrap inference
bootstrap_632()
.632 and .632+ bootstrap estimators for prediction error
bootstrap_effect_size_ci()
Generic bootstrap CI wrapper for any effect-size function
bootstrap_validate()
Bootstrap .632 / .632+ validation
bound_monotone_test()
Kitagawa (2015) test of instrument validity
build_chain()
Build a complete chain from a list of entries
buttbp()
Butterworth bandpass filter
buttbs()
Butterworth bandstop (notch) filter
butthp()
Butterworth highpass filter
buttlp()
Butterworth lowpass filter
bvcchy()
Bivariate Cauchy density
bvncnd()
Conditional distribution in a bivariate normal
car_rho_bounds()
Valid interval for the CAR dependence parameter rho
car_rho_ols()
Haining's least-squares estimator of the CAR dependence parameter
carvar() carjac() carsim() cargmm() caricar() carres() carbym()
Gaussian conditional autoregressive (CAR) models
catrnd()
Cochran-Armitage test for a linear trend in proportions
cauchy_combination()
Cauchy combination test (Liu and Xie 2020)
causal_e_value() unmeasured_conf_bias() causal_mediation_baron_kenny() mediation_analysis() frontdoor_adjustment() front_door() frontdoor_criterion() mediation_formula()
Causal formulas: E-value, mediation and the front-door
cepst()
Real cepstrum
cgnonl_beta_fletcher_reeves()
cgnonl_beta_fletcher_reeves
cgnonl_beta_polak_ribiere()
cgnonl_beta_polak_ribiere
cgnonl_cubic_interpolate()
cgnonl_cubic_interpolate
cgnonl_line_search_fr()
cgnonl_line_search_fr
cgnonl_nonlinear_cg()
cgnonl_nonlinear_cg
chain_entry()
One step of the hash chain
cheatsheet()
Method cheat sheet
check_referential_integrity()
Check referential integrity (child FK -> parent PK)
chi2_goodness_of_fit()
Chi-squared goodness-of-fit test
chi2_independence()
Chi-squared test of independence
chin1()
The (N - 1) chi-square test for a fourfold table
chisqmc()
Chi-square test with a Monte Carlo p-value
chronos_dequantize()
chronos_dequantize
chronos_detokenize()
chronos_detokenize
chronos_forecast_summary()
chronos_forecast_summary
chronos_mean_scale()
chronos_mean_scale
chronos_quantile_bins()
chronos_quantile_bins
chronos_quantize()
chronos_quantize
chronos_tokenize()
chronos_tokenize
chronos_uniform_bins()
chronos_uniform_bins
ckan_metadata
CKAN Metadata for Open Data APIs
cles()
Common Language Effect Size (probability of superiority)
cli_main()
Command-line analysis entry point
cliffs_delta()
Cliff's delta
cndchk()
Conditional negative definiteness of a semivariogram matrix
cochrans_q()
Cochran's Q test
coef(<morie_lm>)
Extract coefficients from method for morie_lm objects
coef(<morie_lmm>)
Fixed-effect estimates of a morie mixed model
coefficient_of_variation()
Coefficient of variation
cohens_d()
Cohen's d for independent samples
cohens_f()
Cohen's f from eta-squared
cohens_kappa()
Cohen's kappa for two raters
cohens_w()
Cohen's w for chi-squared
collinearity_diagnostics()
Comprehensive multicollinearity diagnostics
column_rule()
Construct a column rule
commands_by_category()
Commands grouped by category
compute_goodness_of_fit()
Comprehensive goodness-of-fit statistics
compute_influence()
Compute leverage and influence diagnostics
compute_residuals()
Compute residual diagnostics
compute_vif()
Variance Inflation Factors
confint(<morie_lm>)
Confidence intervals for method for morie_lm objects
corcin()
Pairs needed for a correlation confidence interval of given limits
corcmp()
Comparison and pooling of independent correlation coefficients
corrci()
Confidence interval for a correlation via Fisher's z
correlation_dist()
Correlation distance between two objects
correlation_matrix()
Pairwise correlation matrix with p-values
correlation_table()
Pairwise correlation matrix with significance stars
corrho()
Test of a Pearson correlation against zero or a hypothesised value
corrng()
Admissible range of a correlation given two others
corss()
Sample size or power for the test of a correlation
corwil()
Williams' test for two dependent correlations
corwsn()
Sample size for a correlation confidence interval of given width
cramers_v()
Cramer's V for a contingency table
create_reproducibility_manifest()
Create a manifest of the environment for reproducibility
cross_validate()
Cross-validate a model using a user-supplied fit/predict pair
crypto_shred()
Crypto-shred: destroy a KEK and report what that covers
csinv()
Inverse of a compound-symmetric matrix
ctresid()
Pearson and adjusted residuals of a contingency table
cvbnd()
Hoeffding confidence bound for a cross-validated risk
d_to_nnt()
Convert Cohen's d to NNT given a control event rate
d_to_or()
Convert Cohen's d to odds ratio
d_to_r()
Convert Cohen's d to Pearson r
dagostino_pearson()
D'Agostino-Pearson omnibus normality test
dataset_catalog
MORIE Dataset Catalog
decision_curve_analysis()
Decision curve analysis
decoupling_test()
Doob decoupling test
definite_integral() horowitz_fredholm_eq() gibbons_are_scale_tests() custody_days_credit() irt_variance_legislator() simulate_utility_shocks() mi_pmm() td3() cv2_genomic()
Applied methods: FTC integral, Fredholm inverse problem, scale-test ARE, custody credit, posterior variances, utility shocks, PMM, TD3 and CV2
delete_d_jackknife()
Delete-d (generalised) jackknife
denoise()
Reverse chain
derive_context_keys()
Derive one key per context, all independent
design_from_prior()
Sobol design pushed through the prior's inverse CDF
detect_overfitting()
Bootstrap optimism-corrected performance
dfa()
Detrended fluctuation analysis (DFA)
did_estimate()
DiD contrast of eq. (13.7) under arbitrary unit weights
did_forest()
Heterogeneous ATT: DiD taken locally under forest weights
doob_trends
Doob Federal Court Affidavit – national-aggregate trend analyses
e_value()
E-value for unmeasured confounding (continuous-ATE scale)
e_value_d()
E-value for a standardised mean difference (Cohen's d)
e_value_hr()
E-value for a hazard ratio
e_value_or()
E-value for an odds ratio
e_value_rr()
E-value for a risk ratio
ecgdet()
Pan-Tompkins QRS / R-peak detector
effect_size_result()
Build an effect-size result
effect_sizes
Comprehensive effect-size calculations
effective_sample_size()
Effective sample size
effects
Treatment effect estimators and marginal-effects extenders
efficacy_test_and_release()
Test-and-release efficacy (eq. 2 of Ashcroft et al. 2021)
em_imputation()
EM imputation under a multivariate normal model
empirical_bayes_moran()
Empirical-Bayes standardized Moran I for area rates
encode_bpe()
Encode text with a trained BPE model
epsilon_squared()
Epsilon-squared (Kelley, 1935)
`==`(<morie_frac>)
Equality of exact rationals
escape_whitespace()
Escape whitespace as U+2581, optionally prefixing the marker
estimate_ate()
IPW-weighted OLS ATE
estimate_ate_gcomputation()
G-computation ATE with its sandwich SE
estimate_pi0()
Estimate the proportion of true null hypotheses (pi0)
estimate_pliv()
Partially Linear IV (PLIV) / Local Average Treatment Effect
estimate_plr()
Partially Linear Regression (PLR) ATE
eta_squared()
Eta-squared from ANOVA sums of squares
expand()
HKDF Expand: counter-mode OKM
explain_file()
Human-readable description of a morie output CSV
explain_known_files()
Names of all morie output CSVs with registered explanations
extenders_nonparam
FDR / nonparametric / quantile / latent-class extenders (Phase 1.n)
extenders_rdd
RDD / IRT extenders (Phase 1.l)
extenders_spatial
Spatial / multivariate / meta-analysis extenders (Phase 1.m)
extenders_stats
Stats extenders (Phase 1.k)
external_validate()
External validation on new data
extract()
HKDF Extract: PRK = HMAC(salt, IKM)
factor_analysis_ml()
Maximum-likelihood factor analysis by EM
fairness_cityprofile
City-agnostic data profiles for the predictive-policing audit
fairness_metrics
Group-disparity metrics for auditing classification systems
fairness_temporal
Multi-city temporal disparity audit
fallback_procedure()
Fallback (fixed-sequence with alpha spending)
fdiffm()
First-difference model for elongated field layouts
fisher_combined()
Fisher's method for combining independent p-values
fisher_exact_test()
Fisher's exact test for a 2x2 table
fitted(<morie_bayes_fit>)
Posterior fitted values (on the response scale)
fitted(<morie_lm>)
Extract fitted values from method for morie_lm objects
fitted(<morie_lmm>)
Fitted values of a morie mixed model
fixed_effects_meta()
Fixed-effects (inverse-variance) meta-analytic pooling
fixed_sequence()
Fixed-sequence (predetermined order) testing
fleiss_kappa()
Fleiss' kappa for multiple raters
format(<morie_otis_result>)
Format method for morie_otis_result objects
format_dataframe()
Apply uniform formatting to numeric columns
format_number()
Format a single number according to style conventions
forward_corrupt()
Forward corruption (closed form)
fourier_terms()
Cosine and sine Fourier pairs, exactly periodic with period
fraction_missing_information()
Fraction of missing information of multiply imputed estimates
friedman_test()
Friedman test (repeated-measures rank ANOVA)
frns_metrics
Group-disparity metrics for auditing classification and risk systems
frns_predpol
Generalised predictive-policing disparity audit
frns_temporal
Multi-city temporal disparity audit
full_diagnostics()
Full diagnostic report
gabc_log_likelihood()
Wilkinson's GABC log-likelihood
gam_smoother()
Thin-plate spline smoother
gamfit()
Fitting the gamma distribution
gamma_generation_time()
Build a gamma generation-time density on a grid, normalised
gktau()
Goodman and Kruskal's tau
glass_delta()
Glass's delta – control-group SD denominator
gmconj()
Gamma-conjugate posterior for an exponential or Poisson rate
gp_fit()
Fit a GP emulator to a log-likelihood ensemble
gp_predict()
Posterior mean and sd at theta
gps_abc()
GPS-ABC adaptive sampler, Meeds & Welling Algorithm 2
group_delay() noise_power() noise_psd() max_step_size() qrs_duration() zero_crossing_rate() spcgm()
Signal measures: group delay, noise level, LMS bound, QRS duration, ZCR, spectrogram
group_time_att()
Group-time ATT(g,t) under staggered adoption
gwrcoef() gwrres() gwrstd() gwrhat() gwrcv() gwrdlt() gwrtst() gwrfwl() gwrsur() gwrpois() gwrlgt()
Geographically weighted regression: coefficients, diagnostics and GLMs
harmonic_mean_p()
Harmonic mean p-value
hawkes_spatial
Spatiotemporal (self-exciting) Hawkes point process
hazard_ratio_table()
Hazard-ratio table from Cox model components
hcepst()
Complex cepstrum with phase unwrapping
hdecon()
Homomorphic deconvolution via cepstral liftering
hedges_g()
Hedges' g – bias-corrected Cohen's d
hfd()
Higuchi fractal dimension
hierarchical_bonferroni()
Hierarchical (serial gatekeeping) Bonferroni procedure
history_match()
Sequential history matching
hkdf()
HKDF: extract-then-expand, or expand-only on uniform input
hochberg()
Hochberg step-up FWER procedure
holiday_matrix()
One indicator per holiday, optionally widened by a window
holm()
Holm step-down FWER procedure
holm_sidak()
Holm-Sidak step-down procedure
hommel()
Hommel FWER procedure
hosmer_lemeshow_test()
Hosmer-Lemeshow goodness-of-fit test for logistic regression
hrvfd()
HRV frequency-domain metrics (VLF, LF, HF, LF/HF)
hrvnl()
HRV nonlinear metrics (Poincare SD1, SD2)
hrvtd()
HRV time-domain metrics (SDNN, RMSSD, pNN50)
hsbkrg()
Bayesian kriging over the Matern class (Handcock and Stein 1993)
hyperplane_side()
Evaluate a hyperplane: value, side and distance
i_squared()
I^2 heterogeneity statistic (Higgins)
implausible()
Wilkinson implausibility rule, eq. (3)
importance_weights()
Importance weights over diffusion steps
incidence_rate_difference()
Incidence rate difference (IRD)
inclusion_proof()
Build an inclusion proof (audit path) for the given leaf
install_cli()
Install the rmorie command-line launcher
intraclass_correlation()
Intraclass correlation coefficient (Shrout & Fleiss 1979)
invbpr()
Prevalence from inverse binomial sampling
jackknife()
Delete-one (leave-one-out) jackknife
james_stein()
James-Stein shrinkage of a vector of normal means
jarque_bera()
Jarque-Bera test for normality
kalman_filter_1d()
Kalman filter for the scalar linear-Gaussian state-space model
kbwrt() bwrot()
Rule-of-thumb kernel bandwidths
kde()
Kernel density estimation
kendall_correlation()
Kendall's tau-b correlation
KERNEL_GAUSSIAN KERNEL_EPANECHNIKOV KERNEL_UNIFORM KERNEL_TRIANGULAR KERNEL_BIWEIGHT
Kernel type integer codes
kernel_cond_moments()
Kernel-weighted conditional mean and variance
kernel_eval()
Evaluate a kernel function at point u
kernel_ridge_regression()
Kernel ridge regression
kfd()
Katz fractal dimension
krftst()
Kenward-Roger adjusted F test for fixed effects
kruskal_wallis()
Kruskal-Wallis H-test
ks_test_one_sample()
One-sample Kolmogorov-Smirnov test
ks_test_two_sample()
Two-sample Kolmogorov-Smirnov test
lasso_fista()
Lasso via ISTA / FISTA
leave_one_out_cv()
Leave-one-out cross-validation
levene_test()
Levene's test for equality of variances
license_check
Runtime license-compatibility guard for morie
likelihood_ratio_test()
Likelihood ratio test for nested models
lilef()
Lilliefors test for normality with the Dallal-Wilkinson p-value
lilliefors_test()
Lilliefors goodness-of-fit test
link_test()
Pregibon link test
linsys()
Classify and solve a linear equation system
littles_mcar_test()
Little's test of missing completely at random
ll3way()
Hierarchical log-linear model for a three-way table
lmdiag() lmerr() lmlag() lmrerr() lmrlag() lmsarma() lmjoint() lmrerr2() lmslx() lmsdm() lmkp() sphet()
Lagrange multiplier (Rao score) tests for spatial dependence after OLS
local_fdr()
Local false discovery rate via empirical-Bayes two-component mixture
local_linear()
Local linear kernel regression
logLik(<morie_lmm>)
Log-likelihood of a morie mixed model
log_likelihood()
Log-likelihood of a PLSA model
longitudinal_sim
Synchronised longitudinal-panel simulation (R parity)
loocv_bandwidth()
Leave-one-out cross-validation bandwidth for NW regression
lrgtst()
Likelihood-ratio (G) test for frequencies
maf_calculation()
Minor allele frequency of each SNP in a marker matrix
mafft_anchors_from()
mafft_anchors_from
mafft_clean()
mafft_clean
mafft_default_raw()
mafft_default_raw
mafft_degap()
mafft_degap
mafft_gap_profiles()
mafft_gap_profiles
mafft_jtt_exchangeability()
mafft_jtt_exchangeability
mafft_lookup()
mafft_lookup
mafft_nw()
mafft_nw
mafft_peaks()
mafft_peaks
mafft_site_score()
mafft_site_score
mafft_weights()
mafft_weights
mafft_xcorr_direct()
mafft_xcorr_direct
mafft_xcorr_fft()
mafft_xcorr_fft
mann_whitney_u()
Mann-Whitney U / Wilcoxon rank-sum test
manski_bounds()
Manski worst-case bounds for the ATE
marginal_structural_model() spatial_dbscan()
Marginal structural model by IPTW, and DBSCAN on point locations
mcnemar_test()
McNemar's test (paired nominal data)
merkle_root()
RFC 6962 Merkle Tree Hash
mgamrf()
Multivariate gamma random field from a shared component
mgwrfit() mgwrcof() mgwrres() mgwrstd() mgwrhat() mgwrcv() mgwrbw() mgwrbk() mgwraic() mgwrdg() mgwrsig() mgwrtst()
Multiscale geographically weighted regression (MGWR)
midranks()
Midrank vector with tie summary (Gibbons Ch 5.6.2)
miexp() mivar() mizval() minorm() miorig() mirand() mimc() miols() miml() miiv()
Moran's I tests: moments, z-score and the residual variants
miprgr_branch_and_bound()
miprgr_branch_and_bound
miprgr_cheatsheet()
miprgr_cheatsheet
miprgr_enumerate_integer()
miprgr_enumerate_integer
miprgr_fractional_variable()
miprgr_fractional_variable
miprgr_round_relaxation()
miprgr_round_relaxation
miprgr_simplex()
Two-phase simplex with Bland\'s rule, maximising c\'x
miprgr_solve_relaxation()
miprgr_solve_relaxation
mistr_apply_rope()
mistr_apply_rope
mistr_attention_span()
mistr_attention_span
mistr_cheatsheet()
mistr_cheatsheet
mistr_grouped_query_attention()
mistr_grouped_query_attention
mistr_mistral_block()
mistr_mistral_block
mistr_rms_norm()
mistr_rms_norm
mistr_rope_angles()
mistr_rope_angles
mistr_sliding_window_mask()
mistr_sliding_window_mask
mistr_swiglu()
mistr_swiglu
model_comparison_table()
Compare multiple model fits on AIC, BIC, log-likelihood and (optional) LR tests
momento_cheatsheet()
momento_cheatsheet
momento_harmonise()
momento_harmonise
momento_mask_patches()
momento_mask_patches
momento_masked_loss()
momento_masked_loss
momento_reconstruction_curve()
momento_reconstruction_curve
momento_task_mask()
momento_task_mask
monte_carlo_spatial_test()
Monte Carlo spatial test by random relabelling
morie_aalen_johansen()
Aalen-Johansen multistate transition matrix
morie_abcrej()
ABC rejection sampler
morie_abod()
Angle-based outlier detection (ABOD)
morie_acceptance_rate_diagnostic()
MCMC acceptance-rate diagnostic
morie_acf_estimate()
Autocorrelation estimate with both divisors
morie_aci()
Adaptive conformal inference (ch. 17 p. 519)
morie_actuarial_lifetable()
Actuarial (grouped) life table
morie_adagrad()
AdaGrad optimiser step
morie_adam()
Adam optimiser step
morie_adamw_step()
AdamW step with decoupled weight decay
morie_adf_test()
Augmented Dickey-Fuller test
morie_adfur()
Augmented Dickey-Fuller unit-root test (ch. 6 p. 149)
morie_adjacency_matrix()
Adjacency matrix from an edge list
morie_adjustment_variances()
Covariate adjustment can cost precision under unequal allocation
morie_aes()
AES block cipher object (digest's AES, natively)
morie_aft()
Parametric accelerated failure time models
morie_aft_generalized_gamma()
Log-normal accelerated-failure-time model
morie_aft_log_logistic()
Log-logistic accelerated-failure-time model
morie_aft_residuals()
Residuals from an AFT fit
morie_aft_weibull()
Weibull accelerated-failure-time model
morie_age_crime_aggregate()
Aggregate age-crime curve of a mixture of latent types
morie_age_crime_type_cov() morie_age_crime_panel_cov()
Cross-age covariance of a type mixture, and its test on panel counts
morie_aggregateatt()
Aggregate ATT(g, t) cells
morie_aitchison_balance()
Aitchison balance coordinate
morie_akp_effect_size() morie_median_se() morie_winsorized_regression()
Robust effect size, median error and Winsorized regression
morie_alammar_sdp_attention()
Scaled dot-product attention (Vaswani et al. 2017)
morie_alloc_optimal()
Cost-constrained optimal allocation across strata
morie_alpha_from_gamma()
Invert gamma = 1 / (alpha (1 - alpha)) for alpha
morie_alteration_ramsey()
The alteration method
morie_anamorphosis()
Anamorphosis transform
morie_anm_direction()
Causal direction from an additive noise model
morie_anominate_ideal_points()
Alpha-NOMINATE ideal-point estimation via anominate
morie_anova_one_way()
One-way ANOVA
morie_anova_twoway()
Two-way ANOVA with sequential (Type I) sums of squares
morie_approx_dp()
Empirical delta at a fixed epsilon
morie_approx_ladder()
The (1 + a)^n approximation ladder
morie_ar_spectrum()
Autoregressive power spectrum
morie_arch_in_mean()
ARCH(1)-in-mean model
morie_arch_lm_test()
Engle's ARCH-LM test
morie_are_nonparametric()
Asymptotic relative efficiencies of the classical location tests
morie_are_orthogonal()
Are two Latin squares orthogonal?
morie_arsau_analyze_aggregate_summary()
Analysis of the ARSAU aggregate-summary-by-year file (2020-2022)
morie_arsau_analyze_detailed_dataset()
Wide-format analysis of the 2020-2022 detailed-incident dataset
morie_arsau_analyze_individual_records()
End-to-end analysis of the ARSAU individual_records CSV for one year
morie_arsau_analyze_main_records()
End-to-end analysis of the ARSAU main_records CSV for one year
morie_arsau_analyze_probe_cycle_records()
Analysis of ARSAU probe_cycle_records (CEW telemetry)
morie_arsau_analyze_weapon_records()
Analysis of ARSAU weapon_records
morie_arsau_available_datasets()
List ARSAU dataset kinds, optionally restricted to one year
morie_arsau_available_years()
List ARSAU year / year-range buckets
morie_arsau_ckan_url()
Build the upstream CKAN datastore_search URL for a registry entry
morie_arsau_describe()
Describe a single ARSAU dataset entry
morie_arsau_download()
Bulk-download ARSAU CSVs from the Ontario Data Catalogue
morie_arsau_fetch_sidecar()
Fetch the CKAN sidecar JSON for a registry entry
morie_arsau_load_aggregate_summary()
Load ARSAU aggregate-summary-by-year CSV (2020-2022 only)
morie_arsau_load_detailed_dataset()
Load ARSAU detailed-incident-level CSV (2020-2022 only)
morie_arsau_load_individual_records()
Load ARSAU individual_records CSV
morie_arsau_load_main_records()
Load ARSAU main_records CSV for the given year
morie_arsau_load_probe_cycle_records()
Load ARSAU probe_cycle_records CSV (CEW telemetry)
morie_arsau_load_weapon_records()
Load ARSAU weapon_records CSV
morie_arsau_read_markdown_dictionary()
Read an Ontario-Catalogue Markdown data-dictionary sidecar
morie_arsau_read_sidecar()
Read a CKAN datastore_search JSON sidecar
morie_arsau_read_xlsx_dictionary()
Read an Ontario-Catalogue XLSX data-dictionary sidecar
morie_arsau_registry_df()
ARSAU registry rendered as a tidy data.frame
morie_arsau_sidecar_schema()
Extract a simplified [name, type, notes] schema from a parsed CKAN sidecar
morie_arsau_sidecar_to_frame()
Convert a CKAN sidecar's records array-of-arrays into a data.frame
morie_astle_balding_grm()
Astle-Balding genomic relationship matrix
morie_ate_potential_outcomes()
Average treatment effect from potential outcomes
morie_ate_sensitivity()
l1 sensitivity of a TMLE of the ATE
morie_att_weights()
ATT inverse-probability-of-treatment weights
morie_attenuation_two_regressor()
Measurement error attenuates only in the one-regressor case
morie_attractiveness_contraction()
The discrete attractiveness field contracts absent crime
morie_audit_all_variables()
Audit both OTIS and ARSAU
morie_audit_arsau_variables()
Audit every ARSAU variable
morie_audit_categories()
Audit the categorical columns of a data frame for coding hazards
morie_audit_otis_variables()
Audit every OTIS variable
morie_audit_public_outputs()
Audit declared outputs against files on disk
morie_autocorf()
Sample autocorrelation function (ch. 3)
morie_autocorrelation()
Sample autocorrelation function with Ljung-Box
morie_autoencoder_anomaly()
Linear-autoencoder reconstruction-error anomaly score
morie_autoform()
Autoformer decomposition plus Auto-Correlation, eqs. (1), (5), (6)
morie_average_derivative()
Density-weighted average derivative
morie_average_derivative_hat()
Sample average derivative with an undersmoothed bandwidth
morie_azuma_bound()
Azuma-Hoeffding for a martingale with bounded differences
morie_backdoor_adjustment()
Back-door adjustment formula
morie_backdoor_criterion()
Back-door criterion for an adjustment set
morie_backdoor_sets()
Admissible back-door adjustment sets, smallest first
morie_backfitting()
Backfitting for additive models
morie_backlog_censoring()
The disposed-cases mean as a bound: what the pending cases imply
morie_backlog_published()
Published court statistics read through Little's law
morie_balanced_twophase()
Balanced/spread-sample and two-phase variance estimators
morie_bandwidth_mise()
MISE-optimal bandwidth
morie_baron_kenny()
Baron-Kenny stepwise mediation
morie_bartels_rank_test()
Bartels rank test of randomness (native)
morie_basEvap()
FAO-56 Penman-Monteith reference evapotranspiration
morie_baseline_hazard()
Kernel-smoothed baseline hazard
morie_basic_composition()
Basic and advanced privacy composition
morie_bayes()
Bayes' theorem over a complete hypothesis set
morie_bayes_binomial()
Bayesian inference for a binomial probability
morie_bayes_compare()
Compare posterior means against an external (lm) reference
morie_bayes_continue()
Continue an MCMC run from its final state
morie_bayes_cpi_genomic()
BayesC-pi spike-and-slab variable selection (short Gibbs)
morie_bayes_density()
Posterior density plot for one parameter (BS6.3)
morie_bayes_diagnostics()
All convergence diagnostics for a fit (details of each checker used)
morie_bayes_ess()
Effective sample size (per parameter, autocorrelation-based)
morie_bayes_factor_savage_dickey()
Savage-Dickey Bayes factor (Verdinelli & Wasserman 1995, bfsd)
morie_bayes_geweke()
Geweke convergence diagnostic (z-score comparing chain segments)
morie_bayes_lm()
Fit a Bayesian linear regression by random-walk Metropolis
morie_bayes_plot()
Default MCMC plot (trace, density, or both)
morie_bayes_rhat()
Gelman-Rubin R-hat for a set of MCMC chains
morie_bayes_ridge_gibbs()
BayesA via short Gibbs sampler (Meuwissen-Hayes-Goddard 2001)
morie_bayes_risk_dpi()
Post-processing cannot lower the best squared-error risk
morie_bayesian_horseshoe()
Horseshoe linear regression (Makalic & Schmidt 2016 Gibbs sampler)
morie_bayesian_lasso_full()
Bayesian LASSO (Park & Casella 2008 short Gibbs)
morie_brr_gibbs()
Bayesian regression samplers
morie_bayesian_ridge_regression()
Bayesian ridge regression (RR-BLUP closed form)
morie_bayisr()
Importance resampling (SIR)
morie_bcoinbf()
Free-bias against fixed-bias coin (eq. 3.12, 3.20, 3.22, pp. 52-53)
morie_bcoinlik()
Bent-coin likelihood (eq. 3.8, p. 51)
morie_bcoinpri()
Uniform prior density on the bent-coin bias (eq. 3.9, p. 51)
morie_bdtrns()
Manski no-assumptions identification bound for a mean
morie_bekk_garch()
Scalar BEKK(1,1) multivariate GARCH
morie_bell_number()
Bell numbers by the Bell triangle
morie_bellman_value()
Value iteration with the Bellman contraction audited
morie_beta_schedule_values()
Beta schedule values for T diffusion steps (hmdfw)
morie_betti_numbers_gf2()
Simplicial Betti numbers over F_2
morie_bibd_parameters()
Necessary conditions for a balanced incomplete block design
morie_bic_model_average()
BIC model averaging
morie_bicdag()
Gaussian BIC score of a DAG
morie_big_add()
Add two arbitrary-precision integers
morie_big_binom()
Exact binomial coefficient
morie_big_cmp()
Compare two arbitrary-precision integers
morie_big_divmod_small()
Divide an arbitrary-precision integer by a small whole number
morie_big_factorial()
Exact factorial
morie_big_fits_double()
Is this value exactly representable as an R double?
morie_big_mul()
Multiply two arbitrary-precision integers
morie_big_ndigits()
Number of decimal digits
morie_big_pow()
Raise an arbitrary-precision integer to a whole power
morie_big_sub()
Subtract arbitrary-precision integers
morie_bigint()
Arbitrary-precision integer from a string or a double
morie_binary_mediation()
Binary-outcome causal mediation by inverse odds-ratio weighting
morie_binomial_dist()
Binomial distribution surface
morie_binomial_inference()
Binomial inference: PMF, MLE variance, Wilson interval, true confidence
morie_binseg()
Binary segmentation for changepoints
morie_binsumga()
Gaussian sum behind the central binomial approximation (eq. 1.41, p. 17)
morie_bipartite_matching()
Maximum bipartite matching by augmenting paths
morie_bl_distance()
Bounded-Lipschitz distance
morie_blastp()
BLAST maximal segment pair with Karlin-Altschul E-value
morie_blocking_crossover()
Blocking does not always increase power: the within-pair correlation crossover
morie_blomqvist_beta()
Blomqvist's beta from a copula
morie_bnd_imbens_manski()
Imbens-Manski confidence interval for a partially identified parameter
morie_bnd_lp()
Sharp linear-programming bounds on a linear target
morie_bnd_manski()
Manski worst-case bounds on a partially observed mean
morie_bnd_moment_inequality()
Moment-inequality criterion and confidence set
morie_bnd_polya_tree()
Polya-tree posterior mean density
morie_bndapp()
Manski-Pepper MTR-MTS bounds
morie_bndest()
Manski worst-case bounds
morie_bns_jump_test()
Barndorff-Nielsen & Shephard jump test
morie_boot()
Native nonparametric bootstrap (ordinary, stratified)
morie_boot_basic_ci()
Direct bridge to boot::boot.ci
morie_boot_ci()
Native bootstrap confidence intervals
morie_boot_nonoverlap_block()
Non-overlapping block bootstrap
morie_boot_run()
Direct bridge to boot::boot
morie_bootss()
Rao-Wu-Yue rescaled bootstrap for stratified cluster samples
morie_bootstrap_sample()
Bootstrap resampling for any statistic
morie_boryis()
Borusyak-Jaravel-Spiess event-study imputation estimator
morie_bounds_confidence()
Imbens-Manski confidence interval for a partially identified parameter
morie_bowarc()
Whether a pair forms a bow
morie_boxcox()
Box-Cox transformation (ch. 6 p. 164)
morie_boxplot_outliers()
Boxplot outlier rules on the ideal fourths
morie_boyd_backtracking()
Backtracking line search
morie_boyd_newton()
Newton step for unconstrained minimisation
morie_boyd_newton_decrement()
Newton decrement
morie_boyd_proximal()
Proximal operator
morie_bracken_abundance()
Bracken Bayesian abundance re-estimation
morie_breslow_tie_correction()
Cox model with the Breslow tie correction
morie_breusch_pagan() morie_durbin_watson() morie_vif()
Regression diagnostics
morie_bricklayer()
Assemble the rest of the morie family from R
morie_bridge_covariance()
Brownian bridge covariance
morie_bridgs()
Bridge sampling estimate of a ratio of normalising constants
morie_brr_balanced()
Balanced repeated replication half-samples
morie_brr_variance()
Balanced repeated replication variance
morie_brute_force_max_weight()
Maximum-weight independent set by exhaustive search
morie_bspline_basis()
B-spline basis by the Cox-de Boor recursion
morie_bt_632()
.632 error estimator – alias entry point
morie_bt_bias()
Bootstrap bias estimate and correction
morie_bt_ci_ratio()
Percentile bootstrap CI for a ratio
morie_bt_iid()
Nonparametric IID bootstrap of a statistic
morie_bt_jackknife()
Leave-one-out jackknife
morie_bt_oob()
Out-of-bag error for a bootstrap-aggregated predictor
morie_bt_var()
Bootstrap variance from replicates
morie_btarsv()
Buhlmann AR-sieve bootstrap
morie_btcalib()
Loh exact bootstrap calibration of the t interval
morie_btdbl()
Beran prepivoted double-bootstrap confidence interval
morie_btiseq()
Beran prepivoted and twice-prepivoted bootstrap mean test
morie_budget_optimum()
Stick versus carrot under a fixed budget: the interior optimum
morie_budget_rule()
The budget-constrained optimal rule is a threshold on the conditional effect
morie_build_outputs_manifest()
Build an outputs manifest from a directory of artifacts
morie_builtin_db()
Get path to the built-in MORIE datasets database
morie_burg_method()
Burg lattice AR estimation
morie_burkov_linear_function()
Linear model f(x) = wx + b (Burkov Eq 1.1)
morie_burkov_mse_cost()
MSE cost of the linear model (Burkov Eq 1.3)
morie_burkov_squared_error()
Squared error (Burkov Eq 1.2)
morie_burnside_orbit_count()
Burnside's lemma
morie_bvdecomp()
Squared-error decomposition into bias, variance and noise (p. 158)
morie_cache_clear()
Clear morie's persistent cache directory
morie_cache_dir()
morie cache contract
morie_cache_file()
Cache local RDS/CSV data into the SQLite database
morie_cache_list()
List all tables in the MORIE cache
morie_cache_load()
Load a table from the MORIE cache
morie_cache_store()
Store a data frame in the MORIE cache
morie_calculate_ebac()
Calculate estimated Blood Alcohol Concentration (eBAC)
morie_calculate_ipw_weights()
Calculate inverse probability of treatment weights (IPTW)
morie_calfeat()
Calendar and time features (ch. 6 p. 168)
morie_calibration()
Mixed-model calibration estimators
morie_calibration_chi2()
Chi-square calibration to known margins
morie_calibration_flip()
Calibration to the recorded label and to the true label cannot both hold across groups
morie_calibration_weights()
Calibration weights via iterative proportional fitting (raking)
morie_canonicalize_cpads_data()
Canonicalize raw CPADS PUMF columns
morie_catalan_number()
Catalan numbers
morie_ordinal_probs() morie_ordinal_probit_gibbs() morie_multinomial_probs() morie_multinomial_loglik() morie_penalized_multinomial() morie_penalized_poisson()
Ordinal and multinomial models
morie_catstop()
CAT precision stopping rule
morie_caus_aipw()
Augmented inverse-probability-weighted (doubly robust) ATE
morie_caus_did_sun_abraham()
Sun-Abraham interaction-weighted event study
morie_caus_dml_partial_lin()
Double machine learning for the partially linear model
morie_caus_iv_2sls()
Two-stage least squares
morie_caus_iv_dag()
The instrumental-variable estimand under a causal graph
morie_caus_iv_late()
Local average treatment effect
morie_caus_iv_liml()
Limited-information maximum likelihood
morie_causal_caliper_matching()
Caliper matching on the propensity score
morie_causal_did_three_way()
Triple difference (DDD)
morie_causal_falsification_test()
Pre-treatment falsification (placebo) regression
morie_causal_forest()
Honest causal forest for heterogeneous treatment effects
morie_causal_forest_bootstrap()
Bootstrap confidence intervals for the causal-forest CATE
morie_causal_forest_predict()
Predict CATEs at new covariate values from a fitted causal forest
morie_causal_impact()
Bayesian structural time-series intervention analysis
morie_causal_iptw_atoweights()
Propensity weights: ATO overlap, ATE, or ATT
morie_causal_mahalanobis_match()
Mahalanobis-distance matching
morie_causal_mediation()
Causal mediation by inverse probability weighting
morie_causal_overlap_diagnostic()
Common-support and positivity diagnostic
morie_causal_robust_se()
Robust / heteroskedasticity-consistent variance for a fitted model
morie_causal_rosenbaum_bound()
Rosenbaum sensitivity bound for matched pairs
morie_causal_survival_blp()
Best linear predictor for the causal survival forest CATE
morie_causal_survival_forest()
Causal survival forest on IPCW restricted-mean-survival pseudo outcomes
morie_causal_weighting()
Estimate balancing weights
morie_causdidcs()
Callaway-Sant'Anna staggered DiD (module-name entry point)
morie_causdidev()
Event-study imputation estimator (module-name entry point)
morie_cause_specific_hazard()
Cause-specific hazard model
morie_causrdd()
Sharp regression discontinuity, local linear
morie_causrddf()
Fuzzy regression discontinuity (Wald ratio)
morie_causrddh()
Imbens-Kalyanaraman optimal RDD bandwidth
morie_causrung()
One rung of the Ladder of Causation (Table 2.1, ch. 2 p. 15)
morie_cbcapx()
Gaussian approximation to the central binomial (eq. 1.40, p. 17)
morie_ccc_multivariate_garch()
CCC multivariate GARCH (Bollerslev 1990)
morie_cdaeRC_decode()
morie_cdaeRC_decode
morie_cdp_subgaussian_amplification()
Zero-concentrated DP composition
morie_censoring_at_risk_weight()
Inverse-probability-of-censoring weights
morie_cepstrum_pitch()
Cepstral pitch estimate
morie_check_buffer()
Validate a DQN replay buffer of (s, a, r, s2[, done]) rows (hmdqn)
morie_check_plugin_license()
Check whether a downstream package's SPDX is GPL-compatible
morie_cheeger_bound()
Conductance of a hot-spot set and the Cheeger bound on the spectral gap
morie_chen_transform()
Chen's (2002) rank estimator of T
morie_chernoff_bound()
Chernoff bounds on a binomial tail
morie_chgseg()
Mean-change segmentation (PELT)
morie_chi_square_test()
Chi-square test of independence or goodness-of-fit
morie_choice_based_max_score()
Maximum-score estimator for a choice-based sample
morie_choice_based_shares()
Variance-minimising shares for a choice-based sample
morie_christoffersen_cc()
Christoffersen conditional-coverage test for VaR exceedances
morie_ckan_search()
Search any CKAN open-data portal for datasets
morie_classify_variable()
Classify one variable
morie_cli()
Run the rmorie command line
morie_cli_dump_catalog()
Emit a unified catalog CSV for the rmorie command line
morie_cliff_delta() morie_brunner_munzel()
Rank-based comparisons of two groups
morie_cluster()
k-means clustering with a full model-object contract
morie_cluster_batch()
Batch-cluster several data sets
morie_cluster_robust_effect()
Cluster-robust (CR0) treatment effect
morie_cluster_sample()
Two-stage cluster sampling
morie_cluster_twostage()
Cluster and two-stage sampling estimators
morie_cluster_variance()
Variance of a mean under cluster sampling
morie_cmuti()
Mutual information via the Gaussian copula
morie_cnn_genomic()
CNN genomic predictor (Conv1D + GAP + dense, base R)
morie_cohens_d()
Cohen's d effect size
morie_coherence()
Magnitude-squared coherence between two time series
morie_coin_independence()
General independence test via coin
morie_coin_oneway()
Permutation one-way ANOVA via coin
morie_coin_wilcoxon()
Permutation Wilcoxon test via coin
morie_cokriging()
Co-kriging front door
morie_collider()
Collider structures (immoralities, v-structures), ch. 5 p. 82
morie_collider_arrest()
Collider bias from conditioning on arrest: the odds ratio among arrestees
morie_compare_nested_logistic_models()
Compare nested logistic-regression models via likelihood-ratio test
morie_competing_risks_fg()
Fine-Gray subdistribution hazard model
morie_composition_budget()
Basic composition of privacy budgets
morie_compute_design_weights()
Compute inverse-probability design weights
morie_concentration_decompose()
Decompose crime concentration into crime-free places and the rest
morie_concentration_dispersion()
Dispersion of place counts against the Poisson null and its mixtures
morie_concentration_distinct_growth()
Growth of the number of distinct places under preferential allocation
morie_concentration_gini()
Gini coefficient of a count vector
morie_concentration_null_bound()
How much Gini concentration chance alone can show
morie_concordance_corr()
Lin's concordance correlation coefficient
morie_concordance_incomplete()
Kendall's coefficient of concordance W (Gibbons Ch 12.5)
morie_concordance_index() morie_survival_concordance()
Harrell's concordance index
morie_confusion_matrix_metrics()
Confusion matrix with precision / recall / F1 (R parity)
morie_contagion_branching()
Branching-ratio arithmetic of a self-exciting (Hawkes) crime process
morie_contagion_extinction()
Extinction probability of a near-repeat chain
morie_contagion_moment_witness()
Two count laws with the same mean and variance: what a K-function cannot tell apart
morie_contaminated_bounds()
Contaminated-sample bounds for a recorded proportion
morie_contingency_coefficient()
Pearson contingency coefficient C (Gibbons Ch 14.2.1)
morie_contraction_conditions()
i.i.d. posterior contraction theorem
morie_control_comparison()
Nonparametric many-to-one comparisons to a control (Gibbons Ch 10.7)
morie_control_median_test()
Mood's median (control-median) test (Gibbons Ch 6.5)
morie_convex_hull()
Convex hull of planar points
morie_convlayer()
Output of a convolutional layer, Equation 12-1 (p. 423)
morie_conv2d()
Convolutional feature maps
morie_copod()
COPOD: copula-based outlier detection
morie_copula_cdf()
Bivariate copula CDF
morie_copula_fit()
Fit a copula by maximum-likelihood via copula
morie_copula_sample()
Draw a random sample from a copula via copula
morie_copula_spearman()
Spearman's rho implied by a copula
morie_copula_survival()
Survival copula for paired event times
morie_copula_tau()
Kendall's tau implied by a copula parameter
morie_cor_pearson_cpp
morie_cor_pearson_cpp
morie_corrections_uof_resource_ids()
Canonical CKAN resource id table for the Corrections UoF dataset
morie_count_edges()
Number of edges in a simple undirected graph
morie_count_glm()
Count-model (Poisson family) utilities
morie_court_backlog()
Court backlog arithmetic: Little's law on a docket
morie_covariate_balance()
Standardised mean difference for covariate balance
morie_covariate_balance_check()
Covariate balance after weighting or matching
morie_cox_breslow_step()
Breslow estimator of the baseline cumulative hazard
morie_cox_dfbeta_influence()
Cox DFBETA influence diagnostics
morie_cox_frailty()
Cox model with a shared gamma frailty
morie_cox_martingale_residuals()
Cox martingale residuals
morie_cox_overdispersion()
Any intensity heterogeneity forces overdispersion
morie_cox_ph() morie_cox_partial_loglik() morie_survival_cox()
Cox proportional-hazards model
morie_cox_schoenfeld_residuals()
Schoenfeld residuals and the proportional-hazards test
morie_cox_score_process()
Cox partial-likelihood score process
morie_cox_stratified()
Stratified Cox model
morie_cox_time_varying()
Cox model with time-varying COEFFICIENTS
morie_cpads_canonicalize_frame()
Canonicalize raw CPADS PUMF columns into morie's analysis schema
morie_cpads_contract()
Return the CPADS analysis-frame contract
morie_cpads_has_raw_columns()
Detect whether a data frame looks like raw CPADS PUMF data
morie_cpads_infer_file_format()
Infer the on-disk file format for a CPADS file path
morie_cpads_missing_variables()
Identify missing canonical CPADS variables in a column set
morie_cpads_validate_frame()
Validate a data frame against the canonical CPADS analysis contract
morie_cpd_all_analyses()
Run the full Chicago Police Department analysis suite
morie_cqr()
Conformalized quantile regression (ch. 17 pp. 514-515)
morie_cramers_v()
Cramer's V for categorical association
morie_cressie_hawkins()
Cressie-Hawkins robust semivariogram estimator
morie_crim_etas()
Temporal ETAS model (Epidemic-Type Aftershock Sequence)
morie_crim_hawkes_multivariate()
Multivariate Hawkes process (exponential kernels)
morie_crim_near_repeat()
Knox near-repeat test (space-time interaction)
morie_crim_risk_terrain()
Risk terrain model
morie_crosstab_verify()
Prove a recode with a before/after cross-tabulation
morie_croston()
Croston's method for intermittent demand
morie_crypto_chacha20_poly1305_decrypt()
ChaCha20-Poly1305 IETF authenticated decryption
morie_crypto_chacha20_poly1305_encrypt()
ChaCha20-Poly1305 IETF authenticated encryption
morie_crypto_hkdf_sha256()
HKDF-SHA256 (RFC 5869) key derivation
morie_crypto_hqc_decaps()
HQC-128 decapsulation
morie_crypto_hqc_encaps()
HQC-128 encapsulation
morie_crypto_hqc_keygen()
HQC-128 keypair (code-based KEM)
morie_crypto_hybrid_container_version()
Which hybrid container a ciphertext is
morie_crypto_hybrid_decrypt()
Hybrid decrypt: ML-KEM-768 + ChaCha20-Poly1305
morie_crypto_hybrid_encrypt()
Hybrid encrypt: ML-KEM-768 + ChaCha20-Poly1305
morie_crypto_hybrid_keygen()
Generate an ML-KEM-768 key pair for hybrid encryption
morie_crypto_keystore_create()
Create a new empty morie keystore
morie_crypto_keystore_list()
List key names in the morie keystore
morie_crypto_keystore_load()
Load a key pair from the morie keystore
morie_crypto_keystore_public_key()
Public key of a key pair in the morie keystore
morie_crypto_keystore_store()
Store a key pair in the morie keystore
morie_crypto_lamport_keygen()
Lamport one-time signature keypair (native, SHA-256)
morie_crypto_lamport_sign()
Sign one message with a Lamport keypair (native)
morie_crypto_lamport_verify()
Verify a Lamport one-time signature (native)
morie_crypto_liboqs_available()
Is liboqs available in this morie build?
morie_crypto_liboqs_version()
liboqs runtime version string
morie_crypto_mldsa65_keygen()
ML-DSA-65 keypair generation (NIST FIPS 204)
morie_crypto_mldsa65_sign()
ML-DSA-65 signature
morie_crypto_mldsa65_verify()
ML-DSA-65 signature verification
morie_crypto_mlkem768_decaps()
ML-KEM-768 decapsulation
morie_crypto_mlkem768_encaps()
ML-KEM-768 encapsulation
morie_crypto_mlkem768_keygen()
ML-KEM-768 keypair generation (NIST FIPS 203)
morie_crypto_pqc_inventory()
Inventory of the post-quantum families available in this build
morie_crypto_random_bytes()
Cryptographically secure random bytes
morie_crypto_slhdsa_keygen()
SLH-DSA-SHA2-128s keypair (hash-based signatures, FIPS 205)
morie_crypto_slhdsa_sign()
SLH-DSA-SHA2-128s signature
morie_crypto_slhdsa_verify()
SLH-DSA-SHA2-128s verification
morie_crypto_sodium_available()
Is libsodium available in this morie build?
morie_crypto_sodium_version()
libsodium runtime version string
morie_csr_nn_test()
Test a point pattern against complete spatial randomness
morie_cssant()
Callaway-Sant'Anna staggered difference-in-differences
morie_cycle_index_necklaces()
Necklaces: colourings up to rotation
morie_dag()
Build a causal DAG
morie_dag_estimate()
Estimate the identified effect from data
morie_dag_identify()
Identify the causal effect in a DAG (backdoor criterion)
morie_dag_refute()
Refute an estimated causal effect
morie_dark_figure_bounds()
Sharp bounds on a true victimisation rate and its dark figure
morie_dark_figure_breakdown()
Breakdown analysis for a dark-figure conclusion
morie_dark_figure_comparable()
The dark figure from a survey that covers only some offences
morie_dark_figure_hierarchy()
Incident versus offence counting: the hierarchy-rule arithmetic
morie_dark_figure_no_interaction()
The never-listed cell of a three-list capture under no three-way interaction
morie_dark_figure_three_list()
Three-list capture-recapture: what is and is not identified
morie_dark_figure_two_source()
Two-source (capture-recapture) count with a dependence box
morie_data_variance()
Population and sample variance of a data vector
morie_dataset_catalog()
List all datasets in the MORIE catalog
morie_dataset_column_profile()
Build a single-column profile record
morie_dataset_detect_role()
Detect the suggested epidemiological role of a column
morie_dataset_infer_level()
Infer the Stevens NOIR measurement level for a single vector
morie_dataset_info()
Get metadata for a single dataset
morie_dataset_load()
Load a dataset from a CSV / TSV / Excel / Parquet / JSON file
morie_dataset_portal_catalog()
Build the cross-portal dataset catalog
morie_dataset_portal_catalog_clear_cache()
Clear the session-scoped portal-catalog cache
morie_dataset_profile()
Fully profile a data frame without prior schema knowledge
morie_dataset_profile_summary_table()
Render a human-readable dataset profile summary table
morie_dataset_profile_to_list()
Serialize a dataset profile to a plain nested list
morie_dataset_suggest_plan()
Suggest an ordered analysis plan based on a dataset profile
morie_dataset_summarize_column()
Compute level-appropriate summary statistics for one column
morie_datasets_arcgis_item_by_id()
Generic by-id loader for any ArcGIS Online Feature Service item
morie_datasets_arcgis_item_metadata()
Resolve any ArcGIS Online item id to its FeatureServer URL + canonical metadata
morie_datasets_arsau_aggregate_summary()
Ontario Use-of-Force aggregate summary (5-year 2020-2022, pre-RBDS rollup)
morie_datasets_arsau_detailed_dataset()
Ontario Use-of-Force detailed dataset (5-year 2020-2022, pre-RBDS)
morie_datasets_arsau_uof_individual_records()
Ontario Use-of-Force individual records (one row per individual-in-incident)
morie_datasets_arsau_uof_main_records()
Ontario Use-of-Force main records (one row per incident)
morie_datasets_arsau_uof_probe_cycle_records()
Ontario Use-of-Force probe-cycle records (one row per CEW cartridge probe per individual-in-incident)
morie_datasets_arsau_uof_weapon_records()
Ontario Use-of-Force weapon records (one row per weapon per individual-in-incident)
morie_datasets_bigquery()
Pull a BigQuery table (or filtered slice) as a data.frame
morie_datasets_browse()
Browse + filter the morie cross-portal dataset catalog
morie_datasets_calgary_community_crime_stats() morie_datasets_calgary_fire_response_calls() morie_datasets_calgary_fire_stations()
Calgary Community Crime Statistics (sample)
morie_datasets_calgary_open_crime_adjacent_layers() morie_datasets_edmonton_open_crime_adjacent_layers() morie_datasets_ottawa_open_crime_adjacent_layers()
Calgary Open Data crime-adjacent catalog
morie_datasets_calgary_socrata_by_id() morie_datasets_edmonton_socrata_by_id()
Fetch a Calgary Open Data Socrata dataset by ID
morie_datasets_chicago_arrests()
City of Chicago Open Data – Arrests feed (dpt3-jri9)
morie_datasets_chicago_community_areas()
Chicago Community Area boundaries (cauq-8yn6)
morie_datasets_chicago_crime()
City of Chicago "Crimes – 2001 to Present" feed (ijzp-q8t2)
morie_datasets_chicago_crime_map()
City of Chicago "Crimes – 2001 to Present – Map" view (ahwe-kpsy)
morie_datasets_chicago_crime_odata()
City of Chicago Crimes feed via OData v4 (ijzp-q8t2)
morie_datasets_chicago_crime_resolved()
One-call Chicago crime + boundary + dictionary join
morie_datasets_chicago_crime_soql()
City of Chicago Crimes feed – arbitrary-SoQL escape hatch
morie_datasets_chicago_iucr_codes()
Chicago Police Department – Illinois Uniform Crime Reporting (IUCR) code dictionary (c7ck-438e)
morie_datasets_chicago_neighborhoods()
Chicago Neighborhoods boundary (Office of Tourism)
morie_datasets_chicago_police_beats()
Chicago Police Beats (current) boundaries (n9it-hstw)
morie_datasets_chicago_police_districts()
Chicago Police Districts (current) boundaries (24zt-jpfn)
morie_datasets_chicago_wards()
Chicago City Council Ward boundaries (sp34-6z76)
morie_datasets_cihi_data_tables()
Catalogue of CIHI open data-table workbooks
morie_datasets_ckan_package()
Pull every CSV resource of a CKAN package as a list of data frames
morie_datasets_ckan_search()
Search a CKAN open-data portal by free-text query
morie_datasets_corrections_uof_ethnic_origin()
Inmate-participant ethnic origin
morie_datasets_corrections_uof_incident_type()
Incident-type lookup
morie_datasets_corrections_uof_incidents()
Use-of-force incidents (head dataset)
morie_datasets_corrections_uof_indigenous()
Inmate-participant Indigenous identity
morie_datasets_corrections_uof_inmate_incident()
Inmate-to-incidents bridging table
morie_datasets_corrections_uof_inmate_participant()
Inmate-participant demographics (head)
morie_datasets_corrections_uof_institution_summary()
Institution-level annual incident summary
morie_datasets_corrections_uof_location_summary()
Location-of-incident annual summary
morie_datasets_corrections_uof_race()
Inmate-participant race
morie_datasets_corrections_uof_religion()
Inmate-participant religion
morie_datasets_corrections_uof_select_incident_summary()
Select-incident-type annual summary
morie_datasets_corrections_uof_staff_incident()
Staff-to-incidents bridging table
morie_datasets_cpads()
Load the Canadian Postsecondary Alcohol and Drug-use Survey (CPADS)
morie_datasets_cpd_public_arrests()
Chicago Police Department – Public Arrest Data (2014-2017)
morie_datasets_edmonton_police_stations() morie_datasets_edmonton_fire_stations()
Edmonton Police Station locations
morie_datasets_external_socrata_layers()
List the external Socrata datasets wrapped by morie
morie_datasets_load_by_key()
Load a dataset by its cross-portal catalog dataset_key
morie_datasets_montreal_ckan_resource()
Fetch records from any donnees.montreal.ca CKAN datastore resource
morie_datasets_montreal_justice_safety_layers()
Donnees Montreal "Loi, justice et securite publique" catalog
morie_datasets_montreal_sim_intervention_types()
SIM intervention TYPE -> French description dictionary
morie_datasets_montreal_sim_interventions()
SIM Montreal Fire Service intervention records (sample)
morie_datasets_namus_missing_persons()
NamUs missing-persons case metadata
morie_datasets_nibrs()
FBI NIBRS offence-event records via the Crime Data Explorer API
morie_datasets_nist_rds()
NIST Reference Datasets (RDS) catalog metadata
morie_datasets_nyc_boroughs()
NYC Borough Boundaries (gthc-hcne)
morie_datasets_nyc_boundaries_catalog()
Unified catalog of NYC OpenData boundary loaders
morie_datasets_nyc_community_districts()
NYC community district boundaries
morie_datasets_nyc_council_districts()
NYC City Council district boundaries
morie_datasets_nyc_ntas_2020()
NYC Neighborhood Tabulation Areas (2020)
morie_datasets_nyc_nypd_arrests_historic()
NYPD Arrests Data (Historic)
morie_datasets_nyc_nypd_arrests_ytd()
NYPD Arrest Data (Year to Date)
morie_datasets_nyc_nypd_boro_crosswalk()
NYPD borough-code cross-reference (1-letter / UPPER / numeric)
morie_datasets_nyc_nypd_by_key()
Generic NYC NYPD dataset loader by registry key
morie_datasets_nyc_nypd_complaint_historic()
NYPD Complaint Data Historic
morie_datasets_nyc_nypd_complaint_ytd()
NYPD Complaint Data Current (Year To Date)
morie_datasets_nyc_nypd_hate_crimes()
NYPD Hate Crimes
morie_datasets_nyc_nypd_law_books()
NYS / NYC statute book code dictionary
morie_datasets_nyc_nypd_layers()
List the NYPD criminal-justice Socrata datasets wrapped by morie
morie_datasets_nyc_nypd_offense_codes()
NYPD offense-code dictionary (ky_cd + pd_cd + descriptions)
morie_datasets_nyc_nypd_resolved()
One-call NYPD data + borough + precinct join
morie_datasets_nyc_nypd_uof_incidents()
NYPD Use of Force Incidents
morie_datasets_nyc_nypd_uof_subjects()
NYPD Use of Force: Subjects
morie_datasets_nyc_nypd_vehicle_stops()
NYPD Vehicle Stop Reports
morie_datasets_nyc_opendata_bulk_layers() morie_datasets_chicago_opendata_bulk_layers() morie_datasets_toronto_opendata_bulk_layers() morie_datasets_calgary_opendata_bulk_layers() morie_datasets_edmonton_opendata_bulk_layers() morie_datasets_ottawa_opendata_bulk_layers() morie_datasets_montreal_opendata_bulk_layers() morie_datasets_vancouver_opendata_bulk_layers()
NYC OpenData bulk catalog (2851 entities)
morie_datasets_nyc_police_precincts()
NYC Police Precincts boundary layer (y76i-bdw7)
morie_datasets_nyc_school_districts()
NYC public school district boundaries (NYS K-12)
morie_datasets_nyc_socrata_by_id() morie_datasets_chicago_socrata_by_id()
Fetch a NYC OpenData Socrata dataset by ID
morie_datasets_nyc_stop_and_frisk()
NYPD Stop, Question and Frisk (SQF) microdata via NYC OpenData
morie_datasets_nyc_zctas()
NYC ZIP Code Tabulation Areas (ZCTAs)
morie_datasets_ontario_ckan_by_key()
Generic Ontario CKAN dataset loader (by registry key)
morie_datasets_ontario_ckan_layers()
List the Ontario CKAN datasets wrapped by morie
morie_datasets_otis_a01()
Load the OTIS A01 Restrictive-Confinement Detailed Dataset
morie_datasets_otis_a01_restrictive_confinement()
OTIS a01 – Restrictive Confinement (detailed per-individual)
morie_datasets_otis_b01_segregation_detailed()
OTIS b01 – Segregation detailed (per-individual episodes)
morie_datasets_otis_b02_segregation_total_days()
OTIS b02 – Segregation total days per individual
morie_datasets_otis_b03_seg_alerts_by_institution()
OTIS b03 – Segregation placements: alerts + hold by institution
morie_datasets_otis_b04_seg_consecutive_by_region()
OTIS b04 – Segregation consecutive durations by region
morie_datasets_otis_b05_seg_consecutive_lengths()
OTIS b05 – Segregation placements by consecutive-length bucket
morie_datasets_otis_b06_seg_reason_by_institution()
OTIS b06 – Segregation placements: reason for placement by institution
morie_datasets_otis_b07_seg_alerts_by_gender()
OTIS b07 – Segregation placements: alerts + hold by gender
morie_datasets_otis_b08_seg_consecutive_by_institution()
OTIS b08 – Segregation consecutive durations by institution
morie_datasets_otis_b09_seg_n_times()
OTIS b09 – Individuals in segregation by number of times placed
morie_datasets_otis_c01_individuals_total()
OTIS c01 – Total individuals (in custody / restrictive confinement / segregation)
morie_datasets_otis_c02_individuals_by_institution()
OTIS c02 – Individuals by institution
morie_datasets_otis_c03_individuals_race_by_gender()
OTIS c03 – Individuals by race x gender
morie_datasets_otis_c04_individuals_race_by_region()
OTIS c04 – Individuals by race x region
morie_datasets_otis_c05_individuals_religion_by_region()
OTIS c05 – Individuals by religion x region
morie_datasets_otis_c06_individuals_age_by_region()
OTIS c06 – Individuals by age category x region
morie_datasets_otis_c07_individuals_alerts()
OTIS c07 – Individuals: alerts + hold flags
morie_datasets_otis_c08_individuals_religion_by_gender()
OTIS c08 – Individuals by religion x gender
morie_datasets_otis_c09_individuals_age_by_gender()
OTIS c09 – Individuals by age category x gender
morie_datasets_otis_c10_aggregate_durations_by_institution()
OTIS c10 – Aggregate durations by institution
morie_datasets_otis_c11_aggregate_lengths()
OTIS c11 – Aggregate lengths
morie_datasets_otis_c12_aggregate_durations_by_region()
OTIS c12 – Aggregate durations by region
morie_datasets_otis_d01_deaths_in_custody()
OTIS Deaths-in-Custody detailed dataset (d01)
morie_datasets_otis_d02_deaths_by_gender()
OTIS d02 – Deaths in custody by gender
morie_datasets_otis_d03_deaths_by_race()
OTIS d03 – Deaths in custody by race
morie_datasets_otis_d04_deaths_by_religion()
OTIS d04 – Deaths in custody by religion
morie_datasets_otis_d05_deaths_by_age_category()
OTIS d05 – Deaths in custody by age category
morie_datasets_otis_d06_cause_by_alert()
OTIS d06 – Deaths in custody by alert type x institution
morie_datasets_otis_d07_alerts_by_housing_unit()
OTIS d07 – Deaths in custody alerts x housing unit
morie_datasets_siu_director_reports()
SIU director's-reports index (legacy PDF anchors)
morie_datasets_siu_report_fields()
Extract structured fields from an SIU director's-report text or URL
morie_datasets_siu_report_text()
Download an SIU director's-report PDF and return its plain text
morie_datasets_statcan_ccjs_cubes()
Statistics Canada CCJS cube registry (curated subset)
morie_datasets_statcan_cube_metadata()
Fetch a StatCan cube's metadata (dimensions + members) via WDS
morie_datasets_statcan_full_csv_url()
Get the bulk-CSV download URL for a StatCan cube
morie_datasets_statcan_vectors()
Fetch the latest N periods for a set of StatCan vectors via WDS
morie_datasets_summary()
Tally the cross-portal catalog by source + api_mode
morie_datasets_toronto_ambulance_stations()
Toronto Ambulance station locations
morie_datasets_toronto_asr_miscellaneous()
TPS Annual Statistical Report – Miscellaneous data (aggregated)
morie_datasets_toronto_open_ckan_resource()
Fetch records from any open.toronto.ca CKAN resource
morie_datasets_toronto_open_crime_adjacent_layers()
Toronto Open Data crime-adjacent CKAN catalog
morie_datasets_toronto_zoning_per_neighbourhood()
Toronto Zoning per Neighbourhood (EsriCanadaEducation)
morie_datasets_tps_2008_firs()
2008 FIRS
morie_datasets_tps_2009_firs()
2009 FIRS
morie_datasets_tps_2010_firs()
2010 FIRS
morie_datasets_tps_2011_firs()
2011 FIRS
morie_datasets_tps_2012_firs()
2012 FIRS
morie_datasets_tps_2013_firs()
2013 FIRS
morie_datasets_tps_administrative()
Administrative (ASR-AD-TBL-001)
morie_datasets_tps_arcgis_hub_by_id()
Generic TPS ArcGIS Hub dataset loader by hub_id
morie_datasets_tps_arcgis_hub_download()
Direct multi-format downloader (binary or text) for a TPS Hub item
morie_datasets_tps_arcgis_hub_layers()
List the Toronto Police Service ArcGIS Hub datasets wrapped by morie
morie_datasets_tps_arrested_and_charged_persons()
Arrested and Charged Persons (ASR-ENF-TBL-001)
morie_datasets_tps_arrests_and_strip_searches()
Arrests and Strip Searches (RBDC-ARR-TBL-001)
morie_datasets_tps_assault()
TPS PSDP – Assault
morie_datasets_tps_automobile_ksi()
Automobile KSI
morie_datasets_tps_autotheft()
TPS PSDP – Auto Theft
morie_datasets_tps_bicycle_thefts()
Bicycle Thefts Open Data
morie_datasets_tps_bicycletheft()
TPS PSDP – Bicycle Theft
morie_datasets_tps_breakandenter()
TPS PSDP – Break and Enter
morie_datasets_tps_budget_2020()
Budget_2020
morie_datasets_tps_budget_2021()
Budget_2021
morie_datasets_tps_budget_2022()
Budget_2022
morie_datasets_tps_budget_2023()
Budget_2023
morie_datasets_tps_budget_2024()
Budget_2024
morie_datasets_tps_budget_2025()
Budget_2025
morie_datasets_tps_budget_2026()
Budget_2026
morie_datasets_tps_budget_by_command()
Budget_by_Command
morie_datasets_tps_calls_for_service_attended()
Calls for Service Attended (ASR-CS-TBL-003)
morie_datasets_tps_community_safety_indicators()
Community Safety Indicators Open Data
morie_datasets_tps_complaint_dispositions()
Complaint Dispositions (ASR-PCF-TBL-003)
morie_datasets_tps_cyclist_ksi()
Cyclist KSI
morie_datasets_tps_dispatched_calls_by_division()
Dispatched Calls by Division (ASR-CS-TBL-001)
morie_datasets_tps_facilities()
Facilities
morie_datasets_tps_fatals_ksi()
Fatals KSI
morie_datasets_tps_firearms_top_calibres()
Firearms Top Calibres (ASR-F-TBL-001)
morie_datasets_tps_gross_expenditures_by_division()
Gross Expenditures by Division (ASR-PB-TBL-001)
morie_datasets_tps_gross_operating_budget()
Gross Operating Budget (ASR-PB-TBL-005)
morie_datasets_tps_hatecrimes()
TPS PSDP – Hate Crimes
morie_datasets_tps_homicide()
TPS Homicides feed
morie_datasets_tps_homicides()
TPS PSDP – Homicides
morie_datasets_tps_intimate_partner_family_violence()
TPS PSDP – Intimate Partner and Family Violence
morie_datasets_tps_investigated_alleged_misconduct()
Investigated Alleged Misconduct (ASR-PCF-TBL-002)
morie_datasets_tps_killed_and_seriously_injured()
Killed and Seriously Injured
morie_datasets_tps_layers()
List the TPS open-data layers included with morie
morie_datasets_tps_major_crime()
TPS Major Crime Indicators feed
morie_datasets_tps_mha_apprehensions()
TPS Mental Health Act Apprehensions (PSDP)
morie_datasets_tps_miscellaneous_calls_for_service()
Miscellaneous Calls for Service (ASR-CS-TBL-002)
morie_datasets_tps_miscellaneous_data()
Miscellaneous Data (ASR-MISC-TBL-001)
morie_datasets_tps_miscellaneous_firearms()
Miscellaneous Firearms (ASR-F-TBL-003)
morie_datasets_tps_motorcylist_ksi()
Motorcylist KSI
morie_datasets_tps_neighbourhood_crime_rates()
Neighbourhood Crime Rates Open Data
morie_datasets_tps_passenger_ksi()
Passenger KSI
morie_datasets_tps_patrol_zone()
Patrol Zone
morie_datasets_tps_pedestrian_ksi()
Pedestrian KSI
morie_datasets_tps_personnel_by_command()
Personnel by Command (ASR-PB-TBL-004)
morie_datasets_tps_personnel_by_rank()
Personnel by Rank (ASR-PB-TBL-002)
morie_datasets_tps_personnel_by_rank_by_division()
Personnel by Rank by Division (ASR-PB-TBL-003)
morie_datasets_tps_persons_in_crisis_calls_for_service_attended()
Persons in Crisis Calls for Service Attended Open Data
morie_datasets_tps_police_divisions()
Toronto Police Service police division boundaries
morie_datasets_tps_psdp_resolved()
One-call TPS PSDP data + boundary metadata join
morie_datasets_tps_regulated_interactions()
Regulated Interactions (ASR-RI-TBL-001)
morie_datasets_tps_reported_crimes()
Reported Crimes (ASR-RC-TBL-001)
morie_datasets_tps_robbery()
TPS PSDP – Robbery
morie_datasets_tps_search_of_persons()
Search of Persons (ASR-SP-TBL-001)
morie_datasets_tps_shooting_firearm_discharges()
TPS PSDP – Shooting and Firearm Discharges
morie_datasets_tps_shootings()
TPS Shootings and Firearm Discharges feed
morie_datasets_tps_staffing_by_command()
Staffing_by_Command
morie_datasets_tps_theft_from_motor_vehicle()
TPS PSDP – Theft From Motor Vehicle
morie_datasets_tps_theft_over()
TPS PSDP – Theft Over
morie_datasets_tps_tickets_issued()
Tickets Issued (ASR-ENF-TBL-002)
morie_datasets_tps_top_20_offences_of_firearm_seizures()
Top 20 Offences of Firearm Seizures (ASR-F-TBL-002)
morie_datasets_tps_total_public_complaints()
Total Public Complaints (ASR-PCF-TBL-001)
morie_datasets_tps_traffic_collisions()
Traffic Collisions Open Data (ASR-T-TBL-001)
morie_datasets_tps_use_of_force_call_for_service_types()
Use of Force: Call for Service Types (RBDC-UOF-TBL-004)
morie_datasets_tps_use_of_force_call_sources_by_month()
Use of Force: Call Sources by Month (RBDC-UOF-TBL-001)
morie_datasets_tps_use_of_force_gender_composition()
Use of Force: Gender Composition (RBDC-UOF-TBL-006)
morie_datasets_tps_use_of_force_location_of_occurrences()
Use of Force: Location of Occurrences (RBDC-UOF-TBL-003)
morie_datasets_tps_use_of_force_occurrence_category()
Use of Force: Occurrence Category (RBDC-UOF-TBL-005)
morie_datasets_tps_use_of_force_time_of_day_trends()
Use of Force: Time of Day Trends (RBDC-UOF-TBL-002)
morie_datasets_tps_use_of_force_use_of_force_types_and_perceived_weapons()
Use of Force: Use of Force Types and Perceived Weapons (RBDC-UOF-TBL-007)
morie_datasets_tps_victims_of_crime()
Victims of Crime (ASR-VC-TBL-001)
morie_datasets_vancouver_opendata_by_id()
Fetch records from a Vancouver Open Data dataset by ID
morie_datasets_vancouver_opendata_layers()
Vancouver Open Data full dataset catalog (Opendatasoft v2.1)
morie_datasets_vic_cache_dir()
Local cache directory for the Victorian workbooks
morie_datasets_vic_catalog()
Catalog of the Victorian Crime Statistics Agency data tables
morie_datasets_vic_sheets()
Sheet names in a cached Victorian workbook
morie_datasets_vic_table()
Read one Victorian crime data table
morie_datasets_vpd_crime()
Load Vancouver Police Department crime incident data
morie_datasets_vpd_legal_disclaimer()
Read VPD's legal disclaimer (included verbatim from the zip)
morie_datasette_databases()
List the databases served by a Datasette instance
morie_datasette_read()
Read rows from a Datasette table (or run read-only SQL)
morie_db_connect()
Connect to the MORIE cache database
morie_db_create_indexes()
Create the recommended B-tree indexes for a morie cache table
morie_dcc_garch()
DCC(1,1) GARCH front-end
morie_dcc_multivariate_garch()
DCC multivariate GARCH (Engle 2002)
morie_ddqn()
Tabular Double Q-learning
morie_decision_tree_split()
Decision tree split (R parity)
morie_decode_labelled()
Decode a labelled import by its value labels, by code
morie_deconv_normality()
Asymptotic normality of the deconvolution estimator
morie_deconv_rate()
Convergence rates for deconvolution
morie_deconvolution()
Deconvolution kernel density estimate
morie_deep_learning_genomic()
Single-hidden-layer MLP genomic predictor (base R)
morie_default_synthetic_name_map()
Default synthetic-data variable name map
morie_default_workflow_map()
Default workflow step map
morie_deff_cluster()
Design effect from clustering
morie_density()
Density of an undirected simple graph (Wasserman & Faust Ch 4, densty)
morie_dependent_censoring_hazard()
Dependent-censoring diagnostic
morie_derangement_rounding()
The rounding identity for derangements
morie_derangements()
Derangements: permutations with no fixed point
morie_desc_atkinson()
Atkinson inequality index via DescTools
morie_desc_cramers_v()
Cramer's V via DescTools
morie_desc_gini()
Gini coefficient via DescTools
morie_desc_kappa()
Cohen / Fleiss kappa via DescTools
morie_desc_winsorize()
Winsorize a numeric vector via DescTools
morie_describe()
Print the pedagogical narrative for a morie callable
morie_describe_by_name()
String-only variant of morie_describe
morie_design_effect()
Design effect (DEFF)
morie_design_effect_direction()
The design effect of clustering is direction-specific
morie_design_sensitivity()
Design sensitivity: the Gamma at which a sensitivity analysis's limiting power turns
morie_det_rng()
SHA-keyed deterministic RNG for Py<->R parity
morie_det_rng_sha_hex()
SHA-256 hex digest of "name:seed" (for Py<->R cross-check)
morie_detection_rate_shift()
Detection-rate arithmetic of downgrade-and-caution
morie_deterrence_design_check()
Which deterrence partial effects a design can identify
morie_deterrence_logcost()
The expected-cost deterrence response on the log scale, and the discount it implies
morie_deterrence_response()
Direction of deterrence without convexity: optimal offending under certainty and severity
morie_deviance_residual_cox()
Cox deviance residuals
morie_dfbeta_cox()
Fit a Cox model and return its DFBETA diagnostics
morie_dfl_reweight()
DiNardo-Fortin-Lemieux reweighting: composition and structure without a linear model
morie_diagnostic_prevalence()
Diagnostic-test prevalence and Dorfman group testing
morie_did()
Difference-in-differences with automatic staggered-design handling
morie_did_2x2()
Classic 2x2 Difference-in-Differences estimator
morie_did_aggregate_gt_att()
Aggregate group-time ATTs into summary parameters
morie_did_bacon_decomposition()
Goodman-Bacon decomposition of the TWFE DiD estimator
morie_did_borusyak()
Borusyak, Jaravel & Spiess (2024) imputation estimator
morie_did_chaisemartin_dhaultfoeuille()
Heterogeneity-robust DiD (de Chaisemartin & D'Haultfoeuille, 2020)
morie_did_continuous_treatment()
DiD with a continuous (dose) treatment
morie_did_diagnostics()
Comprehensive diagnostics for a 2x2 DiD setting
morie_did_did2s()
Gardner (2022) two-stage difference-in-differences
morie_did_doubly_robust()
Doubly-robust DiD (Sant'Anna & Zhao, 2020)
morie_did_event_study()
Event-study DiD specification
morie_did_fuzzy()
Fuzzy DiD (LATE) via 2SLS
morie_did_group_time_att()
Callaway–Sant'Anna group-time average treatment effects
morie_did_heterogeneous()
Heterogeneity-robust DiD by sub-group / moderator quantile
morie_did_honest_sensitivity()
Honest (relative-magnitudes) sensitivity for event-study estimates
morie_did_panel_fe()
Two-way fixed-effects DiD (panel)
morie_did_parallel_trends_data()
Group-by-time outcome means for parallel-trends visualisation
morie_did_placebo_test_group()
Placebo DiD on sub-groups expected to be unaffected
morie_did_placebo_test_outcome()
Placebo DiD on outcomes that should be unaffected
morie_did_placebo_test_time()
Placebo DiD at fake treatment times
morie_did_repeated_cross_section()
Repeated cross-section DiD (optionally weighted)
morie_did_sensitivity_analysis()
Sensitivity of DiD estimate to parallel-trends violations
morie_did_staggered()
Staggered DiD via group-time ATTs with aggregation
morie_did_sun_abraham()
Sun & Abraham (2021) interaction-weighted event study
morie_did_synthdid_estimate()
Synthetic DiD, explicit-name API (native)
morie_did_synthetic()
Synthetic Difference-in-Differences (Arkhangelsky et al., 2021)
morie_did_test_parallel_trends()
Pre-trend test for parallel trends
morie_did_triple_difference()
Triple-difference (DDD) estimator
morie_did_twoway_fe_weights()
Diagnose TWFE-DiD weights (de Chaisemartin & D'Haultfoeuille, 2020)
morie_did_wild_cluster_bootstrap()
DiD with wild cluster bootstrap p-values (Cameron-Gelbach-Miller, 2008)
morie_dif_delta_mh()
Mantel-Haenszel DIF effect on the ETS delta scale
morie_dif_sample_size()
Focal-group sample size for detecting differential item functioning
morie_difference_sign_test()
Difference-sign test (native)
morie_diffser()
Differencing, ordinary and seasonal (ch. 6 pp. 155-158)
morie_diffu_diffusion_forward()
DDPM forward (noising) process
morie_diffusion_score_matching()
Denoising score-matching objective
morie_digest()
Hash an R object, string, raw vector or file (digest's digest, natively)
morie_digest2int()
Bob Jenkins' one-at-a-time hash of strings to integers (digest's digest2int)
morie_dilworth_decomposition()
Dilworth's theorem, with both sides computed
morie_direct_discrete()
Direct estimation with discrete covariates
morie_dirmulti()
Direct multi-step forecasting (ch. 18 p. 548)
morie_dirrec()
DirRec strategy (ch. 18 p. 551)
morie_discrete_wavelet_anomaly()
Haar wavelet anomaly detection
morie_disparity_benchmark()
Disparity benchmarks: the product identity and the exposure-offset shift
morie_disparity_decomposition()
Oaxaca-Blinder decomposition of a sentencing gap, with its two references and the interaction
morie_disparity_exposure_bounds()
Bounds on a police-outcome disparity when exposure is measured by a proxy
morie_dist_cdf()
Cumulative distribution function at points
morie_dist_integrate()
Integrate a function against a distribution's support, with checks
morie_dist_moment()
A moment of a distribution, analytically or by integration
morie_dist_pdf()
Density / mass of a distribution at points
morie_dist_quantile()
Quantile function
morie_dist_sum()
Sum a discrete distribution's mass (or a moment) with convergence check
morie_distribution()
Construct a general probability-distribution object
morie_dml_clustered()
Cluster-robust double machine learning for the ATE
morie_docalc()
Which of the three rules of do-calculus applies (p. 119)
morie_dointerv()
The do-operator as graph surgery (modularity, ch. 7 p. 154)
morie_dominant_singularity_growth()
Exponential growth rate from the dominant singularity
morie_download()
Download a file with an automatic Wayback fallback (via rmoriebricklayer)
morie_download_bootstrap()
Download bootstrap weight files from CKAN API
morie_dp_adam()
One DP-Adam step
morie_dp_changepoint()
Differentially private changepoint location
morie_dp_count()
Differentially private count
morie_dp_covariance()
Differentially private covariance matrix
morie_dp_exponential_mechanism()
Exponential mechanism for private selection
morie_dp_fedavg()
Differentially private federated averaging
morie_dp_gan()
Differentially private GAN discriminator step
morie_dp_gaussian_mechanism()
Gaussian mechanism for (epsilon, delta)-differential privacy
morie_dp_gaussian_mixture()
Bayesian nonparametric DP Gaussian mixture via dirichletprocess
morie_dp_histogram()
Differentially private histogram
morie_dp_kmeans()
Differentially private k-means
morie_dp_laplace_mechanism()
Laplace mechanism for pure epsilon-differential privacy
morie_dp_logistic()
Differentially private logistic regression
morie_dp_mean()
Differentially private mean of a bounded sample
morie_dp_median()
Differentially private median
morie_dp_minmax()
Private substitute for a range
morie_dp_pca()
Differentially private PCA
morie_dp_predictive()
Exact Dirichlet-process posterior predictive
morie_dp_quantile()
Differentially private quantile
morie_dp_release_calibration()
Calibrate a privacy budget to a tolerable error, or the reverse
morie_dp_sgd()
One DP-SGD step
morie_dp_sum()
Differentially private bounded sum
morie_dp_survival()
Dirichlet-process survival and the Kaplan-Meier limit
morie_dp_synthetic_data()
Differentially private synthetic data
morie_dp_unit_definition()
Unit of privacy: how many records one entity contributes
morie_dpss()
Discrete prolate spheroidal (Slepian) sequences
morie_dqm_check()
Differentiability in quadratic mean
morie_dr_did()
Doubly robust difference-in-differences
morie_dr_learner()
DR-learner: doubly robust meta-learner for the CATE
morie_dr_overlap_weighted()
Overlap-weighted doubly-robust ATE with cross-fitting
morie_drift_forecast()
Random-walk-with-drift forecast
morie_dseptest()
d-separation of x and y given z (ch. 6)
morie_dsp_acf_from_psd()
Autocorrelation from PSD (Wiener-Khinchin)
morie_dsp_alpha_trimmed_mean()
Alpha-trimmed mean filter
morie_dsp_amplitude_histogram()
Amplitude histogram features
morie_dsp_arc_length()
Signal arc length
morie_dsp_band_power()
Bandpower over [f_low, f_high]
morie_dsp_baseline_correlation()
Baseline-corrected Pearson correlation
morie_dsp_centroidal_time()
Centroidal time
morie_dsp_coherence()
Coherence-squared spectrum
morie_dsp_coherence_spectrum()
Coherence spectrum (alias to morie_dsp_coherence)
morie_dsp_comb()
Comb filter built from cascaded notches
morie_dsp_complex_cepstrum()
Complex cepstrum
morie_dsp_complex_demodulation()
Complex demodulation around a carrier
morie_dsp_crest_factor()
Crest factor (peak / RMS)
morie_dsp_cross_correlation()
Normalised cross-correlation up to a maximum lag
morie_dsp_cross_correlation_cpp
morie_dsp_cross_correlation_cpp
morie_dsp_csd()
Cross-spectral density (Welch)
morie_dsp_cv()
Coefficient of variation
morie_dsp_derivative_detect()
Derivative-based peak detection
morie_dsp_dicrotic_notch()
Dicrotic-notch detection in pulse waves
morie_dsp_ensemble_average()
Ensemble average over fixed-length segments
morie_dsp_entropy_histogram()
Shannon entropy from amplitude histogram
morie_dsp_even_odd()
Even-odd decomposition of a finite signal
morie_dsp_fbm_synthesis()
Fractional Brownian motion synthesis (1/f^beta)
morie_dsp_form_factor()
Form factor (RMS / mean-absolute)
morie_dsp_fractal_dim_psd()
Fractal dimension from log-log PSD slope
morie_dsp_hann_filter()
Hann-windowed smoothing filter
morie_dsp_higuchi_fd()
Higuchi fractal dimension
morie_dsp_hilbert_envelope()
Hilbert envelope
morie_dsp_hjorth()
All three Hjorth parameters
morie_dsp_hjorth_activity()
Hjorth activity (variance)
morie_dsp_hjorth_complexity()
Hjorth complexity
morie_dsp_hjorth_mobility()
Hjorth mobility
morie_dsp_homomorphic()
Homomorphic high-pass filter
morie_dsp_hr_from_rr()
Heart rate from RR intervals (BPM)
morie_dsp_integrated_emg()
Integrated EMG (sum of absolute values)
morie_dsp_katz_fd()
Katz / box-counting fractal dimension
morie_dsp_lms()
LMS adaptive filter (Widrow-Hoff)
morie_dsp_lms_cpp
morie_dsp_lms_cpp
morie_dsp_matched()
Matched filter (time-reversed template correlator)
morie_dsp_mean_abs()
Mean absolute value
morie_dsp_mean_frequency()
Mean frequency from PSD
morie_dsp_median_filter()
Median filter
morie_dsp_median_filter_cpp
morie_dsp_median_filter_cpp
morie_dsp_median_frequency()
Median frequency from PSD
morie_dsp_min_phase()
Minimum-phase correspondent via cepstral folding
morie_dsp_moving_average()
Moving-average filter (boxcar)
morie_dsp_myopulse_rate()
Myopulse percentage rate
morie_dsp_nlms()
NLMS adaptive filter
morie_dsp_nlms_cpp
morie_dsp_nlms_cpp
morie_dsp_notch()
IIR notch filter (single frequency)
morie_dsp_onset_detect()
Energy-onset detection
morie_dsp_pan_tompkins()
Pan-Tompkins QRS detector
morie_dsp_parzen_pdf()
Parzen kernel density estimate
morie_dsp_psd_bartlett()
Bartlett PSD estimate
morie_dsp_psd_periodogram()
Periodogram PSD estimate
morie_dsp_psd_to_db()
Convert PSD to decibels
morie_dsp_psd_welch()
Welch PSD estimate (rmorie native)
morie_dsp_qrs_features()
QRS-style waveform descriptors
morie_dsp_rls()
RLS adaptive filter
morie_dsp_rls_cpp
morie_dsp_rls_cpp
morie_dsp_rms()
Root mean square
morie_dsp_ruler_fd()
Ruler / divider fractal dimension
morie_dsp_shannon_energy()
Shannon-energy envelope
morie_dsp_shape_factor()
Shape factor (mean-absolute / mean-sqrt-absolute-squared)
morie_dsp_slope_sign_changes()
Slope sign changes
morie_dsp_snr()
Signal-to-noise ratio estimate (dB)
morie_dsp_snr_improvement()
SNR improvement attributable to a filter (dB)
morie_dsp_spectral_edge()
Spectral edge frequency (e.g. SEF95)
morie_dsp_spectral_entropy()
Spectral entropy (Shannon, base 2)
morie_dsp_spectral_flatness()
Spectral flatness (Wiener entropy)
morie_dsp_spectral_kurtosis()
Spectral kurtosis from PSD
morie_dsp_spectral_moment()
k-th spectral moment
morie_dsp_spectral_ratio()
Spectral power ratio between two bands
morie_dsp_synchronized_average()
Synchronized average around trigger indices
morie_dsp_t_wave()
T-wave detection by post-QRS argmax search
morie_dsp_teager_energy()
Teager-Kaiser energy operator
morie_dsp_template_match()
Normalised template matching
morie_dsp_threshold_detect()
Threshold-based event detection
morie_dsp_turning_points()
Turning-points stationarity test
morie_dsp_turns_count()
Willison turns count
morie_dsp_variance_ratio()
Variance ratio (x vs. y)
morie_dsp_waveform_length()
Waveform length (total variation)
morie_dsp_waveform_length_norm()
Per-sample (normalised) waveform length
morie_dsp_wiener_filter()
Wiener filter (frequency domain)
morie_dsp_wiener_hopf()
Solve the Wiener-Hopf normal equations
morie_dsp_willison_amplitude()
Willison amplitude
morie_dsp_window()
Window function generator
morie_dsp_zero_crossing()
Zero-crossing rate
morie_dual_frame_total()
Dual-frame total with sample overlap (Hartley 1962)
morie_dueling_q()
Combine value + advantage streams: Q = V + A - mean_a A (hmdldqn)
morie_dunnett_test()
Dunnett's many-to-one comparisons with exact multivariate-t p-values
morie_e_div()
E-divisive multiple change-point analysis
morie_e_value()
Compute E-value for unmeasured confounding
morie_ecfp4()
ECFP4 extended-connectivity fingerprint
morie_ecfp6()
ECFP6 extended-connectivity fingerprint
morie_ecod()
ECOD – empirical-CDF outlier detection
morie_ecological_bounds()
Duncan-Davis bounds: what neighbourhood marginals say about an individual rate
morie_ecological_decompose()
Between/within decomposition of a correlation across groups
morie_ecsTCR_co2_forcing()
Radiative forcing from a CO2 concentration ratio
morie_eda_as_vector()
Strip attributes from a vector for attribute-agnostic processing
morie_eda_compare()
Standardised comparison of several tables' summaries
morie_eda_dataset()
Bundle several EDA tables into an explicit multi-table dataset
morie_eda_index()
The index column name of an EDA table
morie_eda_join()
Join two EDA tables on an explicitly named column
morie_eda_plot()
Accessible exploratory plot of one variable against another
morie_eda_summary()
Automatic per-variable summary of a table (meta-level extraction)
morie_eda_table()
Construct an EDA table with an explicit index column
morie_effective_dose()
Effective dose with Fieller's interval
morie_effective_sample_size()
Kish effective sample size
morie_effective_sample_size_bayes()
Effective sample size of an MCMC chain
morie_effective_sample_size_bulk()
Bulk effective sample size
morie_effective_sample_size_tail()
Tail effective sample size
morie_effects_comparisons()
Contrasts / comparisons (native)
morie_effects_emmeans()
Estimated marginal means (native)
morie_effects_predictions()
Adjusted predictions (native)
morie_effects_slopes()
Marginal slopes (partial derivatives, native)
morie_effects_tidy()
Tidy coefficient table for a fitted model
morie_efficiency_bound_ate()
Semiparametric efficiency and minimax bounds for the ATE
morie_efron_tie_correction()
Cox model with the Efron tie correction
morie_eg_coint()
Engle-Granger two-step cointegration test
morie_egarch_model()
EGARCH(1,1) asymmetric volatility model
morie_egregious_loss_forest()
Loss-balanced (imbalance-regularized) causal forest
morie_ehhdec()
EHH decay around a core SNP
morie_emd()
Earth Mover's Distance between two distributions over one domain
morie_emissions_carbon_intensity()
Carbon intensity of a country's grid
morie_emissions_start() morie_emissions_stop() morie_emissions_track()
Track the energy and carbon cost of a computation
morie_emissions_verify()
Verify an emissions capsule
morie_empirical_bayes()
Parametric empirical Bayes shrinkage (Morris 1983)
morie_empirical_bayes_dp()
Empirical Bayes for the Dirichlet concentration
morie_empirical_sup_norm()
Exact uniform norm of the empirical process
morie_ensemble_average()
Ensemble average across realisations
morie_ensure_extras()
Ensure optional packages are installed (interactive helper)
morie_entheo_analyze_subject()
Per-subject DMT vs PCB BOLD pipeline
morie_entheo_available_subjects()
DMT_Imaging: list motion-survived subject IDs
morie_entheo_clone_dmt_imaging()
Clone the DMT_Imaging dataset (Timmerman et al.) into a local cache
morie_entheo_dataset_overview()
DMT_Imaging: dataset overview
morie_entheo_dynamic_functional_connectivity()
Sliding-window dynamic functional connectivity (dRSFC)
morie_entheo_load_eeg_region()
DMT_Imaging: load IRASA EEG regressors for one cortical region
morie_entheo_load_fmri_subject()
DMT_Imaging: load one subject's BOLD AAL parcellation
morie_entheo_lz_complexity()
Lempel-Ziv (LZ76) complexity of a binarised signal
morie_entheo_spectral_band_power()
EEG band-power decomposition via Welch PSD
morie_entropy_balancing()
Entropy balancing
morie_entropy_integral()
Bracketing entropy integral and the Donsker conditions
morie_envhealth_attributable_fraction()
Population attributable fraction
morie_envhealth_burden()
End-to-end pollution burden
morie_envhealth_burden_by_fsa()
Per-area pollution burden
morie_envhealth_crf_pm25() morie_envhealth_crf_no2() morie_envhealth_cheatsheet()
Concentration-response functions for PM2.5 and NO2
morie_envhealth_equity()
Concentration index of exposure by income
morie_envhealth_mortality_displaced()
Deaths avoided under a counterfactual exposure reduction
morie_envhealth_sensitivity()
Exposure-response double machine learning with bootstrap sensitivity
morie_epsilon_dp()
Empirical epsilon of a mechanism
morie_equating_haebara()
Haebara IRT linking
morie_equating_stocking_lord()
Stocking-Lord IRT linking
morie_erdos_ko_rado()
Erdos-Ko-Rado: the largest intersecting family of k-subsets
morie_erdos_szekeres_check()
The Erdos-Szekeres monotone subsequence theorem
morie_esl_adaboost()
AdaBoost.M1 with decision stumps
morie_esl_adaboost_predict()
Classify with an AdaBoost committee
morie_esl_aic_score()
Akaike information criterion
morie_esl_archetypes()
Archetypal analysis
morie_esl_backprop()
Backpropagation sweep
morie_esl_basis_fit_se()
Basis-expansion fit with pointwise standard errors
morie_esl_bayes_basis_posterior()
Posterior of basis coefficients under a Gaussian prior
morie_esl_bic_score()
Bayesian information criterion
morie_esl_boltzmann()
Restricted Boltzmann machine (contrastive divergence)
morie_esl_bootstrap_err()
Bootstrap estimates of prediction error
morie_esl_cross_entropy()
Cross-entropy (multinomial deviance) loss
morie_esl_curds_whey()
Curds and whey multiple-response shrinkage
morie_esl_cv_score()
K-fold cross-validation
morie_esl_decision_tree()
CART regression tree
morie_esl_dirichlet_posterior()
Dirichlet posterior for category probabilities
morie_esl_dirichlet_proc()
Dirichlet process (stick-breaking)
morie_esl_dropout()
Inverted dropout
morie_esl_effective_dof()
Effective degrees of freedom of a linear smoother
morie_esl_em_gmm()
EM for a Gaussian mixture
morie_esl_f_test()
F test of nested linear models
morie_esl_fda()
Flexible discriminant analysis by optimal scoring
morie_esl_forward_stagewise()
Incremental forward stagewise regression
morie_esl_fwer()
Family-wise error rate of M tests
morie_esl_gam()
Generalized additive model by backfitting and local scoring
morie_esl_gaussian_mixture()
Gaussian mixture density
morie_esl_gbm()
Gradient boosting with squared-error loss
morie_esl_gbm_multiclass()
K-class gradient tree boosting
morie_esl_gbm_predict()
Predict with a gradient-boosting model
morie_esl_gcv()
Generalized cross-validation
morie_esl_ggm_fit()
Gaussian graphical model with known structure
morie_esl_graphical_lasso()
Graphical lasso
morie_esl_hme()
Hierarchical mixture of experts fitted by EM
morie_esl_ica()
Independent component analysis (FastICA)
morie_esl_indicator_regression()
Classification by indicator-matrix regression
morie_esl_ising_fit()
Ising model: exact maximum likelihood
morie_esl_isomap()
Isomap
morie_esl_iwls()
Iteratively reweighted least squares for a GLM
morie_esl_kernel_density()
Parzen kernel density estimate
morie_esl_l1_logistic()
L1-penalised logistic regression
morie_esl_l1_margin()
L1-normalised margin of an additive classifier
morie_esl_lasso()
Lasso by cyclic coordinate descent
morie_esl_lda_disc()
Linear discriminant analysis discriminants
morie_esl_least_angle_reg()
Least angle regression
morie_esl_linear_prediction_error()
Prediction error of a least-squares fit
morie_esl_lle()
Locally linear embedding
morie_esl_local_linear()
Local linear regression
morie_esl_local_logistic()
Local multinomial logistic regression
morie_esl_logistic_reg()
Logistic regression
morie_esl_mallows_cp()
Mallows' Cp in ESL's scaling
morie_esl_markov_rf()
Pairwise Markov random field
morie_esl_mars()
Multivariate adaptive regression splines
morie_esl_mda()
Mixture discriminant analysis by EM
morie_esl_mdl()
Minimum description length
morie_esl_median_nn_radius()
Median nearest-neighbour radius in the unit ball
morie_esl_multi_output_ls()
Multiple-output least squares
morie_esl_multinomial_l1()
L1-penalised multinomial logistic regression
morie_esl_multinomial_logit()
Multinomial logistic regression
morie_esl_mvn_em_missing()
EM for a multivariate normal with missing values
morie_esl_nadaraya_watson()
Nadaraya-Watson kernel smoother
morie_esl_naive_bayes()
Gaussian naive Bayes
morie_esl_natural_spline()
Natural cubic spline basis
morie_esl_neural_net()
Single-hidden-layer neural network
morie_esl_nmf()
Non-negative matrix factorisation
morie_esl_ols_normal_equations()
Least squares by QR (ESL eq 3.6)
morie_esl_one_se_rule()
One-standard-error rule
morie_esl_oob_632()
The .632 and .632+ prediction-error estimators
morie_esl_parametric_bootstrap()
Parametric bootstrap bands for a basis-expansion fit
morie_esl_partial_dependence()
Partial dependence
morie_esl_pca_svd()
Principal components by the singular value decomposition
morie_esl_pca_transform()
Project rows onto fitted principal components
morie_esl_pcr()
Principal components regression
morie_esl_penalized_logistic()
Penalised logistic regression on a basis
morie_esl_precision_regression()
Regressions and partial correlations implied by a precision matrix
morie_esl_principal_curve()
Principal curves
morie_esl_prodenica()
Product density ICA (ProDenICA)
morie_esl_projection_pursuit()
Projection pursuit regression
morie_esl_prototype_lvq()
Learning vector quantization (LVQ1)
morie_esl_qda()
Quadratic discriminant analysis discriminants
morie_esl_random_forest()
Random forest for regression
morie_esl_rbf_network()
Radial basis function network with fixed prototypes
morie_esl_residual_sum_squares()
Residual sum of squares at given coefficients
morie_esl_residual_variance()
Unbiased residual variance for a linear model
morie_esl_ridge()
Ridge regression with an unpenalised intercept
morie_esl_score_match()
Score-matching objective
morie_esl_se_beta()
Standard errors of given coefficients
morie_esl_self_organize()
Self-organizing map
morie_esl_sis_screening()
Sure independence screening
morie_esl_smoothing_spline()
Smoothing spline via the Reinsch penalty
morie_esl_sparse_pca()
Sparse principal components
morie_esl_supervised_pc()
Supervised principal components
morie_esl_svc()
Linear support vector classifier
morie_esl_svm_kernel()
Kernel support vector machine
morie_esl_svr()
Support-vector regression with the epsilon-insensitive loss
morie_esl_test_r2()
Test-set R-squared relative to the constant model
morie_esl_thin_plate_spline()
Two-dimensional thin-plate smoothing spline
morie_esl_tree_predict()
Predict with a regression tree
morie_esl_var_beta_hat()
Covariance of the least-squares coefficients
morie_esl_varying_coef()
Varying-coefficient model
morie_esl_vc_bound()
Vapnik-Chervonenkis bounds on the test error
morie_esl_wavelet_smooth()
Haar wavelet smoothing
morie_esl_weight_decay()
Weight-decay penalty and its gradient
morie_esl_z_score()
Z-scores of regression coefficients
morie_ess_autocorrelation()
Effective sample size of an autocorrelated sequence
morie_estimate_atc()
Estimate the Average Treatment Effect on the Controls (ATC)
morie_estimate_ate()
Estimate the Average Treatment Effect (ATE) via Hajek IPW
morie_estimate_att()
Estimate the Average Treatment Effect on the Treated (ATT)
morie_estimate_cate()
Estimate per-unit Conditional Average Treatment Effects (CATE)
morie_estimate_double_ml()
Estimate ATE via Double Machine Learning (Partially Linear Regression)
morie_estimate_dr_forest()
Doubly-robust ATE via causal forest (grf)
morie_estimate_g_computation()
G-computation (outcome regression) ATE estimator
morie_estimate_gate()
Estimate Group Average Treatment Effects (GATE)
morie_estimate_irm()
Estimate the ATE via the Interactive Regression Model (IRM)
morie_estimate_late()
Estimate the Local Average Treatment Effect (LATE) via 2SLS / Wald
morie_eta_squared()
Eta-squared from F-statistic
morie_euler_characteristic()
The Euler characteristic
morie_evalue()
E-value for a bias-scale effect estimate (native)
morie_evidmix()
Total evidence over a set of models (eq. 3.19, p. 53)
morie_evratio()
Posterior model ratio as a product of penalties (eq. 28.13-28.14, p. 351)
morie_evt_dedh()
Dekkers-Einmahl-de Haan moment estimator
morie_evt_extremal_intervals()
Ferro-Segers intervals estimator of the extremal index
morie_evt_extremal_runs()
Runs estimator of the extremal index
morie_evt_extremal_sliding()
Sliding-blocks estimator of the extremal index
morie_evt_gev_cdf()
GEV distribution function (Coles 2001 eq. 3.2)
morie_evt_gev_lmoments()
L-moment estimator of the GEV parameters
morie_evt_gev_loglik()
GEV log-likelihood (Coles 2001 eq. 3.7-3.9)
morie_evt_gev_logpdf()
GEV log-density (Coles 2001 eq. 3.7 integrand; Gumbel eq. 3.9)
morie_evt_gev_mle()
GEV maximum-likelihood fit (Coles 2001 sec. 3.3.2)
morie_evt_gev_pwm()
PWM estimator for the GEV – alias
morie_evt_gpd_pwm()
PWM estimator of the generalised Pareto distribution
morie_evt_hill()
Hill estimator of the tail index
morie_evt_hill_alias()
Hill tail-index estimator – alias entry point
morie_evt_madogram()
Madogram estimator of the Pickands dependence function
morie_evt_pickands()
Pickands estimator of the extreme-value index
morie_ewma_volatility()
EWMA volatility (RiskMetrics 1996)
morie_exact_conditional()
Exact conditional logistic inference
morie_expandcv()
Expanding-window cross-validation (ch. 5 p. 130)
morie_experiment_anova()
One-way and block-randomized ANOVA (crim shelf)
morie_expmc()
Exponential mechanism (module-name entry point)
morie_exponential_dist()
Exponential waiting-time surface
morie_exposure_positivity()
Exposure positivity under Bernoulli assignment
morie_extremal_index_clusters()
The extremal index of a block-cluster process is the reciprocal cluster size
morie_extreme_value_copula()
Bivariate extreme-value copula from a Pickands dependence function
morie_f_change()
Nested-model F change tests
morie_face_smooth()
FACE sandwich-smoothed covariance with FPCA
morie_fairness_apply_profile()
Rename a city data.frame onto the canonical audit schema
morie_fairness_average_odds_difference()
Average Odds Difference (mean of TPR and FPR gaps)
morie_fairness_base_rate_bounds()
Sharp bounds on a true base rate from a noisy recorded one
morie_fairness_bias_amplification()
Bias Amplification Score (parity gap x Gini of group rates)
morie_fairness_city_profile()
Construct a city profile (column map onto the canonical audit schema)
morie_fairness_column_map()
Column map for a city profile
morie_fairness_compare_groups()
Can two groups' true base rates be ordered under label noise?
morie_fairness_ctgan_debiaser()
Rebalance a biased tabular dataset by group
morie_fairness_demographic_parity()
Demographic Parity Gap (difference in favourable-outcome rates)
morie_fairness_disparate_impact()
Disparate Impact Ratio (EEOC four-fifths / 80% rule)
morie_fairness_equalized_odds()
Equalized Odds (TPR / FPR gaps across groups)
morie_fairness_gan
Counterfactual fairness via GAN-style generative models
morie_fairness_get_city()
Look up a registered city profile by case-insensitive name
morie_fairness_gini()
Gini coefficient (concentration of a non-negative distribution)
morie_fairness_implied_fpr()
The false positive rate implied by base rate, PPV and FNR
morie_fairness_list_cities()
List registered city profile names
morie_fairness_noisy_or_detection()
Noisy-OR patrol-detection probabilities
morie_fairness_predpol
Predictive-policing disparity audit (port of morie.fairness.predpol)
morie_fairness_predpol_aggregate_areas()
Aggregate per-record predictive-policing data to per-area
morie_fairness_predpol_calibration_audit()
Predicted-vs-realised rank audit by demographic group
morie_fairness_predpol_score_disparity()
Descriptive score-by-group disparity
morie_fairness_predpol_temporal_audit()
Audit how disparity metrics move over time and across cities
morie_fairness_rates()
Group-wise rates from a confusion table
morie_fairness_register_city()
Register a city profile in the process-local registry
morie_fairness_simulate_biased_crime_data()
Synthetic predictive-policing dataset with a known disparity
morie_fairness_simulation
Simulation primitives for the predictive-policing audit subsystem
morie_fairness_spatial_gan()
Learn a 2-D crime/patrol location distribution
morie_fairness_true_rate()
Recover a true base rate when the noise rates are known
morie_fairness_xai
Model-agnostic explainability (XAI) for bias discovery
morie_fairness_xai_ale()
First-order Accumulated Local Effects (Apley & Zhu)
morie_fairness_xai_ceteris_paribus()
Ceteris-paribus profile for one instance
morie_fairness_xai_partial_dependence()
Partial dependence on one feature (Friedman)
morie_fairness_xai_permutation_importance()
Permutation feature importance (model-agnostic)
morie_fairness_xai_shap_values()
Shapley feature attributions for one instance (sampling estimator)
morie_faithchk()
Faithfulness for one triple (ch. 5 p. 77)
morie_fast_available()
Is the R-side JIT acceleration active?
morie_fauzi_b1_coefficient()
Bias coefficient b_1 (4.14)
morie_fauzi_b2_coefficient()
Bias coefficient b_2 (4.15)
morie_fauzi_b3_coefficient()
Bias coefficient b_3 (4.21)
morie_fauzi_boundary_free_kde()
Boundary-free kernel density estimate by bijection
morie_fauzi_conditions_c1_c6()
Conditions C1-C6 of Chapter 4
morie_fauzi_cumulative_survival_1()
First cumulative survival estimator (4.8)
morie_fauzi_cumulative_survival_2()
Second cumulative survival estimator (4.17)
morie_fauzi_gamma_kde()
Chen gamma-kernel density estimate
morie_fauzi_kde()
Rosenblatt-Parzen kernel density estimate
morie_fauzi_kdfe()
Nadaraya kernel distribution-function estimator
morie_fauzi_kernel_quantile()
Kernel quantile estimator (3.1)
morie_fauzi_lemma_3_1()
Lemma 3.1: asymptotic representation of the kernel quantile estimator
morie_fauzi_mise()
MISE of a second-order kernel density estimate
morie_fauzi_mrl_boundary_free_2()
Boundary-free mean-residual-life estimator (4.24)
morie_fauzi_mrl_naive()
Naive kernel mean-residual-life estimator (4.2)
morie_fauzi_muller_kernel()
Fourth-order Mueller kernel
morie_fauzi_order_m_kernel()
Order-m kernel and its moments
morie_fauzi_quantile_amse()
AMSE of the sample quantile (3.3)
morie_fauzi_theorem_4_3()
Theorem 4.3: biases and variances of the boundary-free MRL estimators
morie_fauzi_theorem_4_4()
Theorem 4.4: asymptotic normality of the boundary-free MRL estimators
morie_fauzi_theorem_4_5()
Theorem 4.5: strong uniform consistency on a bounded interval
morie_fauzi_theorem_4_6()
Theorem 4.6: the mean-residual-life identity at the start of support
morie_fcfp4()
FCFP4 functional-class fingerprint
morie_fdr_qvalues()
FDR / q-values / tail-area p-values via fdrtool
morie_feedback_loop_bound()
Proved upper bound on how far the naive loop can move in N steps
morie_feedback_loop_envelope()
Drift envelope of the discovery urn at any rates
morie_feedback_loop_limit()
Proved limit of the two-region feedback loop
morie_feedback_loop_meanfield()
Mean-field feedback-loop recursion for two regions
morie_feedback_loop_sim()
Stochastic urn simulation of the two-region feedback loop
morie_feedback_loop_urn_law()
Exact law of the stochastic two-region urn with equal rates
morie_felsen()
Felsenstein (1981) pruning likelihood under the F81 model
morie_fetch()
Fetch a dataset from any URL, with automatic format detection
morie_fetch_arcgis()
Query an ArcGIS FeatureServer / MapServer layer
morie_fetch_ckan()
Fetch data from the CKAN API and cache it
morie_fetch_csv()
Read CSV/TSV natively
morie_fetch_html()
Parse HTML natively (tolerant tag scanner, pure R)
morie_fetch_json()
Parse JSON text natively (pure R)
morie_fetch_naps()
Fetch one NAPS hourly air-quality file
morie_fetch_parquet()
Minimal native Parquet reader (pure R)
morie_fetch_siu()
Fetch the Ontario SIU corpus into a 64-column SIU.csv
morie_fetch_tps()
Fetch a TPS category from the Toronto Police ArcGIS REST endpoint
morie_fetch_unified()
Unified fetch dispatcher
morie_fetch_xml()
Parse XML natively into a list tree (pure R)
morie_find_project_root()
Find a project root directory
morie_fine_gray_subdistribution_hazard()
Fine-Gray cumulative incidence
morie_fir_filter()
General FIR filter
morie_first_moment_ramsey()
Erdos's first-moment lower bound on the diagonal Ramsey number
morie_first_passage_time()
First-passage-time probability in a panel model
morie_fisher_exact_test()
Fisher's exact test for 2x2 tables
morie_fit_indices()
OLS fit indices: variance partition, R squared, adjusted R squared, F
morie_forsnp()
Forensic DNA random-match probability and likelihood ratio
morie_fourfeat()
Fourier seasonality terms (ch. 4 p. 61, ch. 5 p. 95)
morie_frechet_check()
Frechet differentiability check
morie_friedman_urn()
The Friedman urn: cross-colour reinforcement pulls the share to one half
morie_functional_delta()
Functional delta method with its remainder
morie_fda_design() morie_fda_fit() morie_fda_beta_function() morie_fda_bic() morie_fda_loocv()
Functional data analysis
morie_g_formula()
Parametric g-formula standardised means
morie_gam()
Generalized additive model fitted natively (mgcv-compatible)
morie_gamma_bound()
A Rosenbaum Gamma bound is not a test of ignorability
morie_gamma_frailty_cox()
Gamma-frailty Cox model
morie_garch_fit()
Fit a GARCH(1,1) model to a return series
morie_garch_recursion()
Conditional-variance recursion
morie_garch_spec_fit()
Fit a conditional-variance model by Gaussian quasi-ML
morie_garch_var_es()
Value-at-Risk and expected shortfall of a one-step forecast
morie_gate()
Group average treatment effects (GATE) by stratified AIPW
morie_gaussian_approx()
Gaussian approximations of binomial and Poisson peaks
morie_gblup_full()
GBLUP – full mixed-model implementation
morie_gchpost()
Posterior over the input of a Gaussian channel (eq. 11.27-11.29, p. 182)
morie_gee_regression()
Generalized estimating equations with a robust covariance
morie_generalized_gamma_aft()
Generalized gamma AFT model
morie_generate_ar_coefficients()
Generate a stationarity-preserving AR coefficient matrix
morie_generate_synthetic_data()
Generate synthetic epidemiology-style tabular data
morie_generate_var_coefficients()
Generate a VAR(L) coefficient array as a 3-d list
morie_genomic_cross_validation()
K-fold cross-validation for genomic-prediction accuracy
morie_grm() morie_gblup() morie_gblup_model() morie_snp_blup() morie_bayes_gblup()
Genomic prediction models
morie_geods()
Geodesics of a four-dimensional metric
morie_geostat_krige()
Kriging interpolation via gstat
morie_geostat_variogram()
Empirical variogram via gstat
morie_geron_1cycle_schedule()
1cycle learning-rate and momentum schedule (Geron Ch 11, morie.fn gr1cy)
morie_geron_a2c()
Advantage actor-critic, A2C (Geron Ch 19, morie.fn hma2c)
morie_geron_a3c()
Asynchronous advantage actor-critic, A3C (Geron Ch 19, morie.fn hma3c)
morie_geron_action_value_function()
Action-value function Q^pi (Geron Ch 18, morie.fn grqpi)
morie_geron_actor_critic_advantage()
One-step actor-critic advantage (Geron Ch 19, morie.fn grac)
morie_geron_adaboost()
Discrete AdaBoost (Geron Ch 6, morie.fn hmadab)
morie_geron_adaboost_weight_update()
AdaBoost sample-weight update (Geron Ch 6, morie.fn gradaw)
morie_geron_adagrad()
AdaGrad step, negative-step convention (Geron Ch 11, morie.fn hmadgr)
morie_geron_adagrad_update()
AdaGrad update, theta-first signature (Geron Ch 11, morie.fn grada2)
morie_geron_adam()
Adam step (Geron Ch 11, morie.fn hmadam)
morie_geron_adam_update()
Adam update, theta-first signature (Geron Ch 11, morie.fn gradmo)
morie_geron_adamax()
AdaMax step (Geron Ch 11, morie.fn hmadmx)
morie_geron_adamw()
AdamW step with decoupled weight decay (Geron Ch 11, morie.fn hmadmw)
morie_geron_adamw_decoupled_weight_decay()
AdamW with decoupled weight decay (Geron Ch 11, morie.fn grwdc)
morie_geron_agglomerative()
Agglomerative hierarchical clustering (Geron Ch 8, morie.fn hmagc)
morie_geron_aic()
Akaike information criterion, vectorised (Geron Ch 8, morie.fn hmaic)
morie_geron_aic_gmm()
AIC for GMM model selection (Geron Ch 8, morie.fn graic)
morie_geron_albert()
ALBERT encoder: factorised embedding + cross-layer sharing (Geron Ch 15, hmalbt)
morie_geron_alexnet()
AlexNet architecture resolved to shapes and parameter counts (Geron Ch 12, hmalex)
morie_geron_anomaly_autoencoder()
Autoencoder anomaly detection (Geron Ch 8, morie.fn hmanae)
morie_geron_anomaly_gmm()
GMM-based anomaly detection: log-density thresholding (hmgand)
morie_geron_arima()
ARIMA(p, d, q) by Hannan-Rissanen (Geron Ch 13, morie.fn hmarim)
morie_geron_arima_forecast()
One-step ARIMA forecast with known coefficients (Geron Ch 13, grarma)
morie_geron_auc_roc()
ROC AUC via the Mann-Whitney identity (Geron Ch 3, morie.fn hmauc)
morie_geron_auc_roc_trapezoid()
ROC curve and AUC by the trapezoid rule (Geron Ch 3, morie.fn grauc)
morie_geron_autoencoder()
Linear undercomplete autoencoder solved by SVD (Geron Ch 18, hmaen)
morie_geron_autoencoder_reconstruction_loss()
Autoencoder reconstruction loss and compression (Geron Ch 18, grael)
morie_geron_autograd()
Reverse-mode autograd over a scalar tape (Geron Ch 10, morie.fn hmagrd)
morie_geron_autograd_chain_rule()
Reverse-mode autodiff over a chain of Jacobians (Geron Ch 10, graut)
morie_geron_auxiliary_task_pretraining()
Auxiliary-task pretraining then fine-tuning (Geron Ch 11, hmauxpt)
morie_geron_backprop_through_time()
Backpropagation through time (Geron Ch 13, morie.fn grbptt)
morie_geron_backpropagation()
Backpropagation through a feed-forward net (Geron Ch 9, morie.fn hmbp)
morie_geron_backpropagation_gradient()
Backpropagation from stored activations (Geron Ch 9/10, morie.fn grbp)
morie_geron_bagging()
Bagging over LCG-seeded bootstrap replicates (Geron Ch 6, morie.fn hmbag)
morie_geron_bagging_predictor()
Bagging aggregator over member predictions (Geron Ch 6, morie.fn grbag)
morie_geron_bahdanau_attention()
Bahdanau (additive) attention (Geron Ch 14, morie.fn hmbdn and grbah)
morie_geron_bart()
BART text-infilling corruption and reconstruction score (Geron Ch 15, hmbart)
morie_geron_batch_gd_grad()
MSE gradient of linear regression (Geron Ch 4, morie.fn hmbgdg)
morie_geron_batch_gradient_descent()
Batch gradient descent with full loss curve (Geron Ch 4 Eq 4-6, grbgd)
morie_geron_batch_learning()
Batch (offline) learning by closed-form least squares (Geron Ch 1, hmbat)
morie_geron_batch_normalization()
Batch normalization with running statistics (Geron Ch 11, morie.fn hmbntr)
morie_geron_batch_normalization_paper()
Batch normalization, Ioffe-Szegedy running form (Geron Ch 11, morie.fn grbn)
morie_geron_batch_size_heuristic()
Batch-size heuristic (Geron Ch 9, morie.fn hmbsz)
morie_geron_beam_search()
Beam search over a next-token scorer (Geron Ch 14, morie.fn hmbms)
morie_geron_beam_search_decoder()
Beam search over a fixed per-step score table (Geron Ch 14, grbeam)
morie_geron_bert()
BERT encoder forward pass with MLM + NSP heads (Geron Ch 15, hmbert)
morie_geron_bert_finetune()
Fine-tune a frozen encoder with a softmax head (Geron Ch 15, hmbftn)
morie_geron_bert_mlm_loss()
BERT masked-language-model loss (Geron Ch 16, morie.fn grmlm)
morie_geron_bert_nsp_loss()
BERT next-sentence-prediction loss (morie.fn grnsp)
morie_geron_bf16()
BF16 quantisation of float32 values (Geron Appendix B, morie.fn hmbf16)
morie_geron_bf16_range()
bfloat16 round-trip and range report (Geron Appendix B, morie.fn grbf16)
morie_geron_bias_variance_tradeoff()
Bias-variance decomposition (Geron Ch 1, morie.fn hmbv)
morie_geron_bic()
Bayesian information criterion, vectorised (Geron Ch 8, morie.fn hmbic)
morie_geron_bic_gmm()
BIC for GMM model selection (Geron Ch 8, morie.fn grbic)
morie_geron_bidirectional_combine()
Combine the two directions of a bidirectional layer (Geron Ch 14, grbrnn)
morie_geron_bidirectional_rnn()
Bidirectional RNN forward pass (Geron Ch 14, morie.fn hmbrnn)
morie_geron_binary_classification()
Binary classification by thresholding a logistic score (Geron Ch 3, hmbin)
morie_geron_biological_neuron()
McCulloch-Pitts neuron (Geron Ch 9, morie.fn hmbnm)
morie_geron_birch()
BIRCH clustering (Geron Ch 8, morie.fn hmbrch)
morie_geron_blip()
BLIP pretraining objectives on paired embeddings (Geron Ch 16, hmblip)
morie_geron_blip2()
BLIP-2 Q-Former bridge (Geron Ch 16, morie.fn hmblp2)
morie_geron_blip_itm_itc()
BLIP multi-task loss with captioning head (Geron Ch 16, morie.fn grblip)
morie_geron_block_feed_forward()
Position-wise feed-forward used by the transformer blocks
morie_geron_block_layer_norm()
Layer norm used by the transformer blocks (morie.fn grteb)
morie_geron_block_multi_head_attention()
Per-head multi-head attention used by the transformer blocks
morie_geron_block_params()
Exact transformer block parameter count, itemised (hmdctr)
morie_geron_box_iou()
Intersection over union of two (x1,y1,x2,y2) boxes
morie_geron_bpe_merge()
Learn a fixed number of BPE merges (Geron Ch 14, morie.fn grbpe)
morie_geron_bpe_tokenizer()
Byte-pair encoding to a target vocabulary size (Geron Ch 14, hmbpet)
morie_geron_cart_algorithm()
CART algorithm (Geron Ch 5, morie.fn hmcart)
morie_geron_cart_split_cost()
CART split cost at a node (Geron Ch 5 Eq 5-2, morie.fn grcart)
morie_geron_causal_mask()
Causal mask: TRUE where attention is forbidden (strictly future) (hmdctr)
morie_geron_ch4_cross_entropy_gradient_vector()
Cross-entropy gradient for one class (morie.fn grn024)
morie_geron_ch4_elastic_net_cost_function()
Elastic net cost, Eq 4-13 convention (morie.fn grn013)
morie_geron_ch4_lasso_regression_cost_function()
Lasso cost, 2*alpha convention (Geron Eq 4-11, morie.fn grn011)
morie_geron_ch4_linear_regression_prediction()
Linear regression prediction (Geron Eq 4-2, morie.fn grn002)
morie_geron_ch4_logistic_regression_prediction()
Logistic thresholded prediction (Geron Ch 4, morie.fn grn016)
morie_geron_ch4_mse_gradient_vector()
MSE gradient vector (Geron Eq 4-7, morie.fn grn007)
morie_geron_ch4_normal_equation()
Normal equation (Geron Eq 4-5, morie.fn grn005)
morie_geron_ch4_simple_linear_life_satisfaction()
Life satisfaction ~ GDP per capita (Geron Eq 4-1, morie.fn grn001)
morie_geron_ch4_softmax_function()
Softmax function (morie.fn grn021)
morie_geron_char_rnn()
Character-level RNN language model (Geron Ch 16, morie.fn hmchrn)
morie_geron_classification_localization()
Classification + localization head (Geron Ch 14, morie.fn hmclc)
morie_geron_classification_mlp()
Classification MLP (Geron Ch 10, morie.fn hmclsn)
morie_geron_classification_mlp_output()
Classification MLP softmax head (Geron Ch 10, morie.fn grmlc)
morie_geron_classification_tree()
Classification tree with leaf-frequency probabilities (Geron Ch 6, morie.fn hmcdt)
morie_geron_clip()
CLIP pretraining with zero-shot prompt matching (Geron Ch 16, morie.fn hmclip)
morie_geron_clip_contrastive_loss()
CLIP symmetric contrastive loss (Geron Ch 16, morie.fn grclp)
morie_geron_computational_graph()
Computational graph with reverse-mode differentiation (Geron Ch 12, morie.fn hmcgrf)
morie_geron_conditional_p()
Row-wise Gaussian affinities with sigma solved to hit a target perplexity
morie_geron_confusion_matrix()
Confusion matrix with per-class precision/recall/F1 (Geron Ch 3, grcfm)
morie_geron_confusion_matrix_labeled()
Confusion matrix over arbitrary labels (Geron Ch 3, morie.fn hmcfm)
morie_geron_contrastive_infonce()
InfoNCE contrastive loss (Geron Ch 16, morie.fn grctr)
morie_geron_contrastive_learning()
Contrastive learning with in-batch negatives (hmcst)
morie_geron_conv2d_forward()
2-D convolution forward pass, single filter (Geron Ch 12, morie.fn grcvf)
morie_geron_conv_autoencoder_trained()
Trained patch convolutional autoencoder (Geron Ch 18, morie.fn hmcae)
morie_geron_conv_output_size()
Convolution output size per axis (Geron Ch 12, morie.fn grcos)
morie_geron_convolutional_autoencoder()
Convolutional autoencoder forward pass (Geron Ch 18, morie.fn grcae)
morie_geron_cosine_annealing()
Cosine annealing schedule (Geron Ch 11, morie.fn hmlcos)
morie_geron_credit_assignment()
Credit assignment over a trajectory (Geron Ch 18, morie.fn hmcrd)
morie_geron_cross_attention()
Scaled dot-product cross-attention (Geron Ch 15, morie.fn grca)
morie_geron_cross_attention_report()
Cross-attention with per-query entropy (Geron Ch 15, morie.fn hmcatt)
morie_geron_cross_entropy_cost()
Softmax cross-entropy cost (Geron Ch 4, morie.fn hmcec)
morie_geron_cross_entropy_gradient()
Softmax cross-entropy gradient (Geron Ch 4, morie.fn hmceg)
morie_geron_cross_validation_score()
K-fold cross-validation score (Geron Ch 1/2, morie.fn grcvs)
morie_geron_curse_dimensionality()
Curse of dimensionality (Geron Ch 8, morie.fn hmcod)
morie_geron_dalle()
DALL-E autoregressive image-token generation (hmdale)
morie_geron_dalle_autoregressive_token()
DALL-E autoregressive image-token scoring (Geron Ch 16, morie.fn grdal)
morie_geron_dataloader()
Mini-batch index plan with deterministic Fisher-Yates shuffling (hmdld)
morie_geron_dataloader_minibatch()
Mini-batch DataLoader indices (Geron Ch 10, morie.fn grdlm)
morie_geron_dbscan()
DBSCAN clustering, BFS over density-connected cores (hmdbs)
morie_geron_dbscan_core_point()
DBSCAN core / border / noise points (Geron Ch 8, morie.fn grdbs)
morie_geron_dcgan()
DCGAN generator/discriminator resolved to concrete shapes (hmdcg)
morie_geron_dcgan_generator()
DCGAN generator forward pass (Geron Ch 18, morie.fn grdcgan)
morie_geron_ddim()
DDIM deterministic sub-sequence sampling (hmddim)
morie_geron_ddim_sampling_step()
Deterministic DDIM sampling step (Geron Ch 18, morie.fn grddim)
morie_geron_ddpg()
Linear DDPG: TD critic, deterministic-policy-gradient actor, Polyak targets (hmddpg)
morie_geron_ddpm()
DDPM: per-timestep affine eps-model trained on the noise-prediction objective (hmddpm)
morie_geron_ddpm_forward_process()
DDPM forward diffusion q(x_t | x_0) (Geron Ch 18, morie.fn grdpmf)
morie_geron_ddpm_reverse_step()
DDPM reverse denoising step (Geron Ch 18, morie.fn grdpmr)
morie_geron_ddpm_simple_loss()
DDPM simplified noise-prediction loss (Geron Ch 18, morie.fn grdpml)
morie_geron_decision_boundary()
Decision boundary for logistic regression theta^T x = 0 (hmdbd)
morie_geron_decoder_only()
Decoder-only transformer (GPT family), resolved to exact param counts (hmdctr)
morie_geron_deep_rnn()
Deep (stacked) RNN forward pass, bottom-up per time step (hmdrnn)
morie_geron_deit()
DeiT: ViT architecture + distillation token, resolved concretely (hmdeit)
morie_geron_deit_distillation_loss()
DeiT hard-label distillation loss (Geron Ch 16, morie.fn grdeit)
morie_geron_denoising_autoencoder()
Denoising autoencoder loss against the clean input (Geron Ch 18, grdae)
morie_geron_denoising_autoencoder_train()
Denoising autoencoder, trained (hmdae)
morie_geron_detr()
DETR: CNN-transformer pipeline resolved concretely; matching via Hungarian (hmdetr)
morie_geron_detr_hungarian_matching()
DETR Hungarian matching and set-prediction loss (Geron Ch 16, grdetr)
morie_geron_diffusion_forward()
Diffusion forward process: chain and closed form, cross-checked (hmdfw)
morie_geron_diffusion_reverse()
Ancestral DDPM reverse sampling from x_T to x_0 (hmdrv)
morie_geron_digamma()
Digamma psi(x) for x > 0 (recurrence + asymptotic series; no scipy dep)
morie_geron_dino()
DINO cross-view self-distillation with centering, sharpening, momentum teacher (hmdino)
morie_geron_dino_self_distillation()
DINO self-distillation loss (Geron Ch 16, morie.fn grdino)
morie_geron_discounted_return()
Discounted return (Geron Ch 18, morie.fn grret)
morie_geron_distilbert()
DistilBERT triple-loss distillation (hmdbrt)
morie_geron_double_dqn()
Double DQN training loop; target computed by the online/target argmax split (hmddqn)
morie_geron_double_dqn_target()
Double DQN targets (Geron Ch 19, morie.fn grddqn)
morie_geron_dpo()
Direct preference optimization (DPO) loss (hmdpo)
morie_geron_dpo_loss()
Direct Preference Optimization loss (Geron Ch 15, morie.fn grdpo)
morie_geron_dqn()
Tabular DQN: replay mini-batches + periodically synced target net (hmdqn)
morie_geron_dqn_loss()
DQN bootstrap MSE loss (Geron Ch 19, morie.fn grdqnl)
morie_geron_dropout()
Inverted dropout (Geron Ch 11, morie.fn grdro)
morie_geron_dropout_alt()
Inverted dropout: y = mask * x / (1 - p) (hmdrp)
morie_geron_dueling_dqn()
Dueling DQN decomposition (Geron Ch 19, morie.fn grduel)
morie_geron_dueling_dqn_alt()
Dueling DQN: exact gradients through Q = V + A - mean(A) (hmdldqn)
morie_geron_dynamic_quantization()
Dynamic INT8 quantization (Geron Ch 19, morie.fn grdyq)
morie_geron_dynamic_quantization_alt()
Dynamic quantization: static per-tensor weights, dynamic per-batch activations (hmdqnt)
morie_geron_early_stopping()
Early stopping on validation RMSE (Geron Ch 4, morie.fn greast)
morie_geron_early_stopping_alt()
Early stopping: batch GD keeping the best validation snapshot (hmearl)
morie_geron_elastic_net()
Elastic net cost: MSE + r\*alpha\*L1 + (1-r)/2\*alpha\*L2 (hmenet)
morie_geron_elastic_net_cost()
Elastic net cost (Geron Eq 4-12, morie.fn grelas)
morie_geron_elbo()
VAE evidence lower bound with closed-form Gaussian KL (hmelb)
morie_geron_elu()
ELU activation (Geron Ch 11, morie.fn hmelu)
morie_geron_embedding_lookup()
Embedding table lookup (Geron Ch 16, morie.fn gremb)
morie_geron_encoder_decoder_seq2seq()
Encoder-decoder seq2seq decoding loop (Geron Ch 16, morie.fn gredsq)
morie_geron_encoder_decoder_transformer()
Original encoder-decoder transformer, resolved to exact params + 3 masks (hmencd)
morie_geron_encoder_only()
Encoder-only transformer (BERT-family), resolved to exact param counts (hmencox)
morie_geron_encoder_params()
Parameter count of a transformer encoder stack
morie_geron_entropy_impurity()
Shannon entropy impurity (Geron Ch 6, morie.fn hment)
morie_geron_epsilon_greedy()
Epsilon-greedy action selection (Geron Ch 18, morie.fn grepl)
morie_geron_epsilon_greedy_alt()
Epsilon-greedy action distribution, deterministic LCG draw (hmeg)
morie_geron_error_analysis()
Error analysis via row-normalised confusion matrix, diagonal removed (hmeaf)
morie_geron_explained_variance_ratio()
Explained variance ratio (Geron Ch 8, morie.fn grevr)
morie_geron_explained_variance_ratio_alt()
Explained variance ratio from the SVD of the centred data matrix (hmevr)
morie_geron_exploding_gradients()
Exploding gradients: gradients grow through layers
morie_geron_extra_trees()
Extra-trees: uniformly random per-feature split thresholds (hmext)
morie_geron_f1_score()
F1 score (Geron Eq 3-3, morie.fn grf1)
morie_geron_f1_score_alt()
F1 score from a confusion matrix delegated to hmcfm (hmf1)
morie_geron_fashion_mnist()
FashionMNIST CNN architecture resolved to concrete shapes (hmfmn)
morie_geron_fcn()
Fully convolutional network forward pass, dense per-pixel prediction (hmfcn)
morie_geron_fcn_upsample()
Transposed convolution / FCN upsampling (Geron Ch 14, morie.fn grfcn)
morie_geron_feature_importance_mdi()
Forest feature importance, MDI (Geron Ch 7, morie.fn grfim)
morie_geron_feature_map()
Feature map: activation(conv(x, K) + b), convolution delegated to hmfmap's core (hmfmap)
morie_geron_feature_map_dim()
Convolutional feature-map size (Geron Ch 14, morie.fn grfmp)
morie_geron_few_shot()
Few-shot in-context prompt construction with a zero-shot control (hmfsf)
morie_geron_filter_kernel()
Convolutional filter tensor, He-initialised (Geron Ch 12, morie.fn hmkrn)
morie_geron_finetune_lm()
Native SGD fine-tuning with frozen params, warmup and weight decay (hmfth)
morie_geron_fit_ab()
Fit (a, b) so 1/(1 + a d^(2b)) matches UMAP's target curve
morie_geron_flamingo()
Flamingo: perceiver resampler + tanh-gated cross-attention (hmflmg)
morie_geron_flamingo_cross_modal_attn()
Flamingo tanh-gated cross-attention (Geron Ch 17, morie.fn grflam)
morie_geron_flash_attention()
FlashAttention: tiled online-softmax, exact (hmfa)
morie_geron_flash_attention_tile()
FlashAttention tiled online softmax (Geron Ch 16, morie.fn grflash)
morie_geron_forward_autodiff()
Forward-mode automatic differentiation via dual numbers (hmfad)
morie_geron_forward_mode_autodiff()
Forward-mode autodiff (Geron Ch 12, morie.fn grfad)
morie_geron_fp16_mixed_precision()
FP16 mixed precision with loss scaling (Geron Ch 19, morie.fn grfp6)
morie_geron_fp16_quant()
IEEE-754 binary16 round-trip with field decomposition (hmfp16)
morie_geron_fp32()
IEEE-754 binary32 field decomposition, reconstructed exactly (hmfp32)
morie_geron_gan()
GAN minimax training: linear generator vs logistic discriminator (hmgan)
morie_geron_gan_minimax()
GAN minimax objective (Geron Ch 17, morie.fn grgan)
morie_geron_gan_mode_collapse_metric()
GAN mode coverage / collapse (Geron Ch 17, morie.fn grmcol)
morie_geron_gaussian_mixture()
Gaussian mixture model fit via EM, log-space responsibilities (hmgmm)
morie_geron_gaussian_rand_projection()
Gaussian random projection X' = X R, R_ij ~ N(0, 1/d') (hmgrp)
morie_geron_gaussian_random_projection()
Gaussian random projection (Geron Ch 8, morie.fn grgrp)
morie_geron_gelu()
GELU activation (Geron Ch 11, morie.fn hmgelu)
morie_geron_gini_impurity()
Gini impurity (Geron Ch 6, morie.fn hmgini)
morie_geron_gini_impurity_grgin()
Gini impurity (Geron Eq 5-1, morie.fn grgin)
morie_geron_glorot_init()
Glorot (Xavier) initialization (Geron Ch 11, morie.fn hmxav)
morie_geron_glorot_xavier_init()
Glorot (Xavier) initialization (Geron Ch 11, morie.fn grxvi)
morie_geron_gmm_em_step()
Gaussian mixture EM step (Geron Ch 9, morie.fn grgmem)
morie_geron_gmm_log_likelihood()
Gaussian mixture log-likelihood (Geron Ch 9, morie.fn grgmll)
morie_geron_gmm_n_params()
Free-parameter count of a GMM (Geron Ch 8, morie.fn graic)
morie_geron_googlenet()
GoogLeNet architecture resolved to concrete shapes and exact params (hmgoog)
morie_geron_gpt1()
GPT-1 architecture (delegated to hmdctr) plus the causal LM objective (hmgpt1)
morie_geron_gpt2()
GPT-2 released configurations resolved through hmdctr (hmgpt2)
morie_geron_gpt3()
GPT-3 175B architecture accounting: exact params, shape trace, KV-cache (hmgpt3)
morie_geron_gpt_autoregressive_loss()
Autoregressive next-token cross-entropy (Geron Ch 16, morie.fn grgptl)
morie_geron_gradient_boosting()
Gradient boosted regression trees: fit residuals sequentially (hmgbrt)
morie_geron_gradient_boosting_residual()
Gradient boosting residual stage (Geron Ch 7, morie.fn grgbm)
morie_geron_gradient_clipping()
Gradient clipping by global norm (Geron Ch 11, morie.fn hmgcl)
morie_geron_gradient_clipping_grgcl()
Global-norm gradient clipping (Geron Ch 11, morie.fn grgcl)
morie_geron_grid_search()
Exhaustive grid search scored by K-fold CV, delegated to morie_geron_cross_validation_score (hmgrs)
morie_geron_grid_search_cv()
Exhaustive grid search with K-fold CV (Geron Ch 2, morie.fn grgs)
morie_geron_gru()
GRU cell forward step (Geron Ch 13, morie.fn hmgru)
morie_geron_gru_cell()
GRU cell forward pass (Geron Ch 15, morie.fn grgruc)
morie_geron_hard_voting()
Hard voting ensemble (Geron Ch 7, morie.fn grvoth)
morie_geron_he_init()
He (Kaiming) normal initialization (Geron Ch 11, morie.fn grhei)
morie_geron_he_init_hmhei()
He (Kaiming) initialization (Geron Ch 11, morie.fn hmhei)
morie_geron_heaviside()
Heaviside step activation (Geron Ch 10, morie.fn hmhev)
morie_geron_heaviside_step()
Heaviside step activation (Geron Ch 10, morie.fn grhev)
morie_geron_hebb_rule()
Hebbian update (Geron Ch 10, morie.fn hmhebb)
morie_geron_hebb_rule_grhbb()
Perceptron (Hebb) learning rule (Geron Ch 10, morie.fn grhbb)
morie_geron_hf_pipelines()
Task pipeline: preprocess -> model -> postprocess (Geron Ch 14, morie.fn hmhfpi)
morie_geron_hf_trainer()
Trainer loop: mini-batch SGD with per-epoch evaluation (Geron Ch 14, morie.fn hmhftn)
morie_geron_hidden_layers_heuristic()
Depth selection by validation-error plateau (Geron Ch 9, morie.fn hmhplm)
morie_geron_histogram_gradient_boosting()
Histogram-based gradient boosting, squared loss (Geron Ch 6, morie.fn hmhgb)
morie_geron_hyperparameter_tuning()
Hyperparameter tuning by grid or random search (Geron Ch 1, morie.fn hmhpt)
morie_geron_image_segmentation()
Colour segmentation by k-means on pixels (Geron Ch 8, morie.fn hmiseg)
morie_geron_imputation_median()
Median imputation with a missingness indicator (Geron Ch 2, morie.fn hmimp)
morie_geron_in_context_learning()
In-context / few-shot prompt assembly (Geron Ch 16, morie.fn grinc)
morie_geron_in_context_learning_hmicl()
In-context learning by prompt-conditioned scoring (Geron Ch 15, morie.fn hmicl)
morie_geron_incremental_pca()
Incremental PCA via streaming co-moment updates (Geron Ch 7, morie.fn hmipca)
morie_geron_information_gain()
Information gain of a split (Geron Ch 6, morie.fn grig)
morie_geron_information_gain_hmigr()
Information gain from a split, entropy criterion (Geron Ch 5, morie.fn hmigr)
morie_geron_instance_based()
k-nearest-neighbour (instance-based) prediction (Geron Ch 1, morie.fn hmins)
morie_geron_int8_quant()
Post-training integer quantization (Geron Ch 17, morie.fn hmint8)
morie_geron_int8_quantization()
Symmetric INT8 quantization (Geron Ch 19, morie.fn grq8)
morie_geron_isomap()
Isomap: geodesic MDS via kNN graph + Dijkstra (Geron Ch 7, morie.fn hmiso)
morie_geron_johnson_lindenstrauss()
Johnson-Lindenstrauss minimum dimension (Geron Ch 8, morie.fn hmjl)
morie_geron_johnson_lindenstrauss_bound()
Johnson-Lindenstrauss minimum dimension (Geron Ch 8, morie.fn grjll)
morie_geron_kernel_pca_from_gram()
Eigen-decomposition step shared by every kernel-PCA variant (Geron Ch 7, morie.fn hmkprbf helper)
morie_geron_kernel_pca_poly()
Kernel PCA with polynomial kernel (Geron Ch 7, morie.fn hmkppl)
morie_geron_kernel_pca_rbf()
Kernel PCA with an RBF kernel (Geron Ch 8, morie.fn grkpc)
morie_geron_kernel_pca_rbf_hmkprbf()
Kernel PCA with RBF kernel (Geron Ch 7, morie.fn hmkprbf)
morie_geron_kernel_pca_sigmoid()
Kernel PCA with sigmoid kernel (Geron Ch 7, morie.fn hmkpsg)
morie_geron_kfold()
K-fold partition plus CV score (Geron Ch 2, morie.fn hmkfd)
morie_geron_kfold_cv()
K-fold cross-validation splits (Geron Ch 2, morie.fn grkfd)
morie_geron_kl_divergence_gaussian()
Gaussian KL to N(0, I) (Geron Ch 17, morie.fn grkldg)
morie_geron_kmeans()
k-means clustering via Lloyd's algorithm, k-means++ seeded (Geron Ch 8, morie.fn hmkmn)
morie_geron_kmeans_limits()
k-means assumption diagnostics (Geron Ch 8, morie.fn hmkmlim)
morie_geron_kmeans_objective()
k-means inertia (Geron Ch 9, morie.fn grkmo)
morie_geron_kmeans_plus_plus()
k-means++ seeding, D^2 sampling (Geron Ch 8, morie.fn hmkmpp)
morie_geron_kmeans_pp_seeding()
k-means++ seeding (Geron Ch 9, morie.fn grkmpp)
morie_geron_knowledge_distillation()
Knowledge distillation loss (Geron Ch 17, morie.fn hmkd)
morie_geron_knowledge_distillation_loss()
Knowledge distillation loss (Geron Ch 19, morie.fn grkdl)
morie_geron_kv_cache_compress()
KV-cache quantization (Geron Ch 17, morie.fn hmkvc)
morie_geron_kv_cache_compression()
KV-cache memory footprint (Geron Ch 16, morie.fn grkvc)
morie_geron_l1_regularization()
L1 (Lasso) penalty, subgradient and prox (Geron Ch 4, morie.fn hml1r)
morie_geron_l2_regularization()
L2 (ridge) regularization penalty (Geron Ch 11, morie.fn hml2r)
morie_geron_lasso_cost()
Lasso cost (Geron Eq 4-10, morie.fn grlaso)
morie_geron_lasso_cost_hmlaso()
Lasso cost = MSE + alpha * L1 penalty (Geron Ch 4, morie.fn hmlaso)
morie_geron_layer_norm_rnn()
Layer normalization inside an RNN cell (Geron Ch 13, morie.fn hmlnr)
morie_geron_layer_normalization()
Layer normalization (Geron Ch 15, morie.fn grln)
morie_geron_layer_normalization_hmlntr()
Layer normalization: per-sample, across features (Geron Ch 11, morie.fn hmlntr)
morie_geron_layer_norms()
Per-layer gradient L2 norms, ordered input side first
morie_geron_leaky_relu()
Leaky ReLU (Geron Ch 11, morie.fn hmlrel)
morie_geron_learning_curves()
Learning curves (Geron Ch 4, morie.fn grlrnc)
morie_geron_learning_curves_hmlcv()
Learning curves: train/validation RMSE vs training-set size (Geron Ch 4, morie.fn hmlcv)
morie_geron_learning_rate_heuristic()
Learning-rate finder heuristic: divergence point / safety (Geron Ch 9, morie.fn hmlrh)
morie_geron_learning_rate_schedule()
Power (1/t) learning-rate schedule (Geron Ch 4, morie.fn hmlrs)
morie_geron_lenet5()
LeNet-5 architecture resolution (Geron Ch 12, morie.fn hmlnet)
morie_geron_linear_layer_forward()
Affine layer forward pass (Geron Ch 10, morie.fn grlinf)
morie_geron_linear_regression_life()
Life satisfaction = theta0 + theta1 * GDP per capita (Geron Ch 1, morie.fn hmlrl)
morie_geron_linreg_mse_cost()
Linear-regression MSE cost and gradient (Geron Ch 4, morie.fn hmmsec)
morie_geron_linreg_mse_cost_grmse()
Linear-regression MSE cost (Geron Eq 4-3, morie.fn grmse)
morie_geron_linreg_pytorch()
Linear regression by SGD, cross-checked against normal equations (Geron Ch 10, morie.fn hmlrpt)
morie_geron_local_outlier_factor()
Local outlier factor (Geron Ch 9, morie.fn grlof)
morie_geron_local_outlier_factor_hmlof()
Local outlier factor (Geron Ch 8, morie.fn hmlof)
morie_geron_locally_linear_embedding()
Locally linear embedding (Geron Ch 7, morie.fn hmlle)
morie_geron_logistic_cost()
Binary log loss (Geron Ch 4, morie.fn hmlogcl)
morie_geron_logistic_cost_gradient()
Logistic cost gradient (Geron Eq 4-18, morie.fn grlogg)
morie_geron_logistic_cross_entropy_cost()
Binary logistic log-loss (Geron Eq 4-17, morie.fn grlogc)
morie_geron_logistic_gradient()
Logistic gradient and Hessian (Geron Ch 4, morie.fn hmlogg)
morie_geron_logistic_probability()
Logistic probability (Geron Ch 4, morie.fn hmlogp)
morie_geron_logistic_regression_probability()
Logistic regression probability (Geron Eq 4-15, morie.fn grlogp)
morie_geron_lr_cosine_annealing()
Cosine annealing LR schedule (Geron Ch 11, morie.fn grlrco)
morie_geron_lr_exponential()
Exponential learning-rate decay (Geron Ch 11, morie.fn hmlrex)
morie_geron_lr_exponential_schedule()
Exponential LR decay (Geron Ch 11, morie.fn grlrex)
morie_geron_lstm()
LSTM cell forward step (Geron Ch 13, morie.fn hmlstm)
morie_geron_lstm_cell()
LSTM cell forward pass (Geron Ch 15, morie.fn grlstc)
morie_geron_mae()
Mean absolute error (Geron Ch 2, morie.fn hmmae)
morie_geron_mae_grmae()
Mean absolute error (Geron Eq 2-2, morie.fn grmae)
morie_geron_masked_lm()
Masked language modelling objective (Geron Ch 15, morie.fn hmmlm)
morie_geron_matmul_order()
Optimal parenthesisation of a matrix chain (matrix-chain DP)
morie_geron_max_norm()
Max-norm projection (Geron Ch 11, morie.fn hmmnr)
morie_geron_max_norm_regularization()
Max-norm weight projection (Geron Ch 11, morie.fn grmnr)
morie_geron_max_pool()
Max pooling over a sliding window, per channel (Geron Ch 12, morie.fn hmmxp)
morie_geron_max_pooling()
2D max pooling (Geron Ch 14, morie.fn grmpl)
morie_geron_mc_dropout()
Monte Carlo dropout uncertainty (Geron Ch 11, morie.fn hmmcd)
morie_geron_mdp()
MDP validation plus value iteration (Geron Ch 19, morie.fn hmmdp)
morie_geron_mds()
Classical (Torgerson) multidimensional scaling (Geron Ch 7, morie.fn hmmds)
morie_geron_mean_shift()
Mean shift: mode-seeking via kernel density gradient ascent (Geron Ch 8, morie.fn hmmnsh)
morie_geron_memory_cell()
Memory-cell recurrence c_t = f(c_prev, x_t) (Geron Ch 13, morie.fn hmmcel)
morie_geron_min_max_scaling()
Min-max scaling to a target range (Geron Ch 2, morie.fn hmmms)
morie_geron_minibatch_gd()
Mini-batch gradient descent (Geron Ch 4, morie.fn hmmbgd)
morie_geron_minibatch_gradient_descent()
Mini-batch gradient descent (Geron Ch 4, morie.fn grmgd)
morie_geron_minibatch_kmeans()
Mini-batch k-means, Sculley's variant (Geron Ch 8, morie.fn hmmbkm)
morie_geron_minmax_scaler()
Min-max feature scaling (Geron Ch 2, morie.fn grmms)
morie_geron_mistral7b()
Mistral-7B architecture accounting (Geron Ch 15, morie.fn hmmis7)
morie_geron_mlp()
MLP forward pass (Geron Ch 9, morie.fn hmmlpf)
morie_geron_mlp_forward()
MLP forward pass (Geron Ch 10, morie.fn grmlpf)
morie_geron_mode_collapse()
Mode-collapse diagnostics (Geron Ch 18, morie.fn hmmdc)
morie_geron_model_based()
Model-based least squares, closed form cross-checked against descent (Geron Ch 1, morie.fn hmmod)
morie_geron_model_context_protocol()
MCP/JSON-RPC 2.0 exchange with envelope validation (Geron Ch 15, morie.fn hmmcp)
morie_geron_model_parallelism()
Optimal contiguous model-parallel layer partition (Geron Ch 17, morie.fn hmmpp)
morie_geron_momentum()
Momentum step (Geron Ch 11, morie.fn hmmom)
morie_geron_momentum_update()
Momentum optimizer step (Geron Ch 11, morie.fn grmom)
morie_geron_multi_head_attention()
Multi-head attention (Geron Ch 16, morie.fn grmha)
morie_geron_multihead_attention()
Multi-head attention: split, attend, concat, project (Geron Ch 15, morie.fn hmmha)
morie_geron_multilabel()
Multilabel classification metrics, leave-one-out kNN default (Geron Ch 3, morie.fn hmmlb)
morie_geron_multilabel_classification()
Multilabel thresholded prediction (Geron Ch 3, morie.fn grmlb)
morie_geron_multinomial_logistic()
Softmax regression fitted by batch gradient descent (Geron Ch 4, morie.fn hmmnl)
morie_geron_multioutput()
Multioutput classification by k-NN vote (Geron Ch 3, morie.fn hmmto)
morie_geron_nadam()
NAdam step (Geron Ch 11, morie.fn hmnadm)
morie_geron_nesterov()
Nesterov accelerated gradient (Geron Ch 11, morie.fn hmnag)
morie_geron_nesterov_accelerated_gradient()
Nesterov accelerated gradient (Geron Ch 11, morie.fn grnag)
morie_geron_neurons_per_layer()
Neurons-per-layer heuristic (Geron Ch 10, morie.fn hmnpl)
morie_geron_nmf_objective()
NMF Frobenius objective (Geron Ch 8, morie.fn grnmfo)
morie_geron_normal_equation()
OLS by the normal equation (Geron Ch 4, morie.fn hmneq)
morie_geron_normal_equation_grnorm()
Normal equation, closed-form OLS (morie.fn grnorm)
morie_geron_numerical_differentiation()
Central-difference numerical derivative (morie.fn grnud)
morie_geron_one_cycle()
1cycle learning-rate policy (Geron Ch 11, morie.fn hml1c)
morie_geron_one_hot_encoding()
One-hot encoding (Geron Ch 2, morie.fn hmohe)
morie_geron_one_hot_encoding_grohe()
One-hot encoding (Geron Ch 2, morie.fn grohe)
morie_geron_one_vs_one()
One-vs-One multiclass reduction (Geron Ch 3, morie.fn grovo)
morie_geron_one_vs_rest()
One-vs-Rest multiclass reduction (Geron Ch 3, morie.fn grovr)
morie_geron_ordinal_encoding()
Ordinal encoding (Geron Ch 2, morie.fn hmord)
morie_geron_ordinal_encoding_grord()
Ordinal encoding (Geron Ch 2, morie.fn grord)
morie_geron_overfitting()
Overfitting diagnostic (Geron Ch 4, morie.fn hmovf)
morie_geron_overfitting_gap()
Train-validation generalisation gap (morie.fn groft)
morie_geron_pca_projection()
PCA projection (Geron Ch 8, morie.fn grpcap)
morie_geron_peephole_lstm_cell()
Peephole LSTM cell (Geron Ch 15, morie.fn grpels)
morie_geron_perceiver_io()
Perceiver IO cross-attention bottleneck (morie.fn grpio)
morie_geron_perceptron()
Perceptron learning rule (Geron Ch 10, morie.fn hmpcpt)
morie_geron_permutation_masks()
Two-stream attention masks for a factorisation order
morie_geron_polynomial_features()
Polynomial feature expansion (Geron Ch 4, morie.fn grpoly)
morie_geron_positional_encoding()
Sinusoidal positional encoding (Geron Ch 16, morie.fn hmpe)
morie_geron_ppo_clipped_objective()
PPO clipped surrogate objective (Geron Ch 19, morie.fn grppo)
morie_geron_precision()
Precision TP/(TP+FP) (Geron Ch 3, morie.fn grpre)
morie_geron_precision_recall_curve()
Precision-recall curve (Geron Ch 3, morie.fn grprc)
morie_geron_predict_tree()
Route rows down a fitted CART tree (morie.fn hmcart::predict_tree)
morie_geron_prioritized_experience_weight()
Prioritized replay importance weights (Geron Ch 19, morie.fn grpex)
morie_geron_pyramid_vit_stage()
Pyramid ViT spatial-reduction attention (morie.fn grpvt)
morie_geron_q_learning()
Tabular Q-learning update (Geron Ch 18, morie.fn hmql)
morie_geron_q_learning_update()
Q-learning update (Geron Ch 18, morie.fn grql)
morie_geron_q_value_iteration()
Q-value iteration (Geron Ch 19, morie.fn grbo)
morie_geron_quantization_aware_training()
Quantization-aware training (Geron Ch 19, morie.fn grqat)
morie_geron_quantize()
Nearest-codebook-entry assignment
morie_geron_quantize_symmetric()
Symmetric quantization kernel (morie.fn grq8 quantize_symmetric)
morie_geron_randomized_search_cv()
Randomized search with K-fold CV (Geron Ch 2, morie.fn grrnd)
morie_geron_recall()
Recall TP/(TP+FN) (Geron Ch 3, morie.fn grrec)
morie_geron_regression_mlp_output()
Regression MLP output head (Geron Ch 10, morie.fn grmlr)
morie_geron_reinforce_policy_gradient()
REINFORCE Monte Carlo policy gradient (Geron Ch 18, morie.fn grrein)
morie_geron_reparameterization_trick()
Reparameterization trick (Geron Ch 17, morie.fn grrep)
morie_geron_resnet()
Residual block (Geron Ch 14, morie.fn hmresn)
morie_geron_resnet_skip()
Residual (skip) connection (Geron Ch 14, morie.fn grrsk)
morie_geron_reverse_mode_autodiff()
Reverse-mode automatic differentiation (Geron Ch 12, morie.fn grrad)
morie_geron_ridge_cost()
Ridge cost (Geron Ch 4, morie.fn hmridg)
morie_geron_ridge_cost_grridg()
Ridge cost (Geron Ch 4, morie.fn grridg)
morie_geron_ridge_normal()
Ridge by the augmented normal equation (Geron Ch 4, morie.fn hmridn)
morie_geron_ridge_normal_equation()
Ridge closed form (Geron Ch 4, morie.fn grridn)
morie_geron_rlhf_reward_kl_objective()
RLHF reward minus KL objective (Geron Ch 15, morie.fn grrlhf)
morie_geron_rmse()
Root mean squared error (Geron Ch 2, morie.fn hmrms)
morie_geron_rmse_grrmse()
Root mean squared error (Geron Ch 2, morie.fn grrmse)
morie_geron_roberta()
RoBERTa pretraining with dynamic masking (Geron Ch 15, morie.fn hmbrob)
morie_geron_roc_curve()
ROC curve (Geron Ch 3, morie.fn grroc)
morie_geron_run_graph()
Re-execute a traced graph, enforcing recorded shapes (ncol must match)
morie_geron_sac()
Soft actor-critic (SAC): entropy-regularized max reward
morie_geron_save_load_pytorch()
Save and load PyTorch model state_dict (RDS-native stand-in)
morie_geron_scaled_dot_product()
Scaled dot-product attention
morie_geron_scaled_dot_product_attention()
Scaled dot-product attention (Geron Ch 16, morie.fn grsdpa)
morie_geron_score_matching_loss()
Denoising score matching loss (Geron Ch 18, morie.fn grscm)
morie_geron_self_attention()
Self-attention, single head (Geron Ch 16, morie.fn grsa)
morie_geron_self_attention_modules()
Self-attention: Q=K=V come from same input
morie_geron_self_supervised()
Self-supervised learning: generate labels from the data itself via pretext task
morie_geron_selu()
SELU activation (Geron Ch 11, morie.fn hmselu)
morie_geron_semantic_segmentation()
Semantic segmentation: per-pixel class labels
morie_geron_semisupervised()
Semi-supervised learning: small labeled set plus large unlabeled pool
morie_geron_semisupervised_cluster()
Semi-supervised learning via k-means representative labeling
morie_geron_senet()
Squeeze-and-Excitation (SENet) block for channel recalibration
morie_geron_senet_squeeze_excite()
Squeeze-and-Excitation channel attention (Geron Ch 14, morie.fn grsen)
morie_geron_sentiment_analysis()
Sentiment analysis with RNN or transformer on tokens
morie_geron_sentiment_binary()
Binary sentiment head (Geron Ch 16, morie.fn grsnt)
morie_geron_separable_params()
Depthwise separable convolution weight count
morie_geron_seq2seq()
Sequence-to-sequence encoder-decoder architecture
morie_geron_sft()
Supervised fine-tuning (SFT) on instruction-response pairs
morie_geron_sft_objective()
SFT masked cross-entropy objective (Geron Ch 15, morie.fn grsft)
morie_geron_sgd_classifier()
SGD classifier with hinge loss (linear SVM) trained by stochastic gradient descent
morie_geron_sgd_update()
Single-sample SGD step (Geron Ch 4, morie.fn hmsgdu)
morie_geron_shannon_entropy()
Shannon entropy (Geron Eq 5-3, morie.fn grent)
morie_geron_sigmoid()
Logistic sigmoid (Geron Ch 4, morie.fn hmsigm)
morie_geron_sigmoid_grsig()
Logistic (sigmoid) activation (morie.fn grsig)
morie_geron_silhouette()
Silhouette score for cluster quality
morie_geron_silhouette_score()
Silhouette score (Geron Ch 9, morie.fn grsil)
morie_geron_simple_imputer()
Simple imputation (Geron Ch 2, morie.fn grimp)
morie_geron_simple_rnn()
Simple RNN forward pass over a sequence
morie_geron_simple_rnn_cell()
Simple (Elman) RNN cell (Geron Ch 15, morie.fn grrnnc)
morie_geron_sinusoidal_positional_encoding()
Sinusoidal positional encoding (Geron Ch 16, morie.fn grpe)
morie_geron_soft_voting()
Soft voting ensemble (Geron Ch 7, morie.fn grvots)
morie_geron_softmax_cost_gradient()
Softmax cross-entropy gradient (morie.fn grxeng)
morie_geron_softmax_cross_entropy_cost()
Softmax cross-entropy cost (morie.fn grxent)
morie_geron_softmax_function()
Softmax (Geron Ch 4, morie.fn hmsftm)
morie_geron_softmax_probability()
Softmax regression probabilities (morie.fn grsmxp)
morie_geron_softmax_score()
Linear class scores for softmax regression (Geron Ch 4, morie.fn hmsfts)
morie_geron_softmax_score_grsmxs()
Softmax class scores (morie.fn grsmxs)
morie_geron_span_corrupt()
T5 span-corruption masking (encoder input / decoder target / spans)
morie_geron_sparse_autoencoder()
Sparse autoencoder objective (Geron Ch 17, morie.fn grsae)
morie_geron_sparse_rand_projection()
Sparse random projection matrix with {-1,0,+1} entries
morie_geron_spectral_clustering()
Spectral clustering: eigenvectors of graph Laplacian
morie_geron_stacked_autoencoder()
Stacked (deep) autoencoder forward pass (morie.fn grstae)
morie_geron_stacked_autoencoder_modules()
Stacked (deep) autoencoder with multiple encoding/decoding layers
morie_geron_stacking()
Stacking (blending): meta-learner combines outputs of base learners
morie_geron_stacking_predictor()
Stacking blender (Geron Ch 7, morie.fn grstk)
morie_geron_standardization()
Standardization / z-score (Geron Ch 2, morie.fn hmstz)
morie_geron_standardization_grstd()
Standardization (Geron Ch 2, morie.fn grstd)
morie_geron_state_value_function()
State value function V^pi (Geron Ch 18, morie.fn grvpi)
morie_geron_static_ptq()
Static post-training quantization (Geron Ch 19, morie.fn grptq)
morie_geron_stochastic_gradient_descent()
Stochastic gradient descent (Geron Ch 4, morie.fn grsgd)
morie_geron_stratified_sampling()
Stratified sampling preserves class/strata proportions in each split
morie_geron_stride()
Stride: step size of kernel sliding over input
morie_geron_supervised_learning()
Supervised learning paradigm: learn mapping f(x)->y from labeled examples
morie_geron_svd_pseudoinverse()
OLS via SVD pseudoinverse (robust to singular X^T X)
morie_geron_swin()
Swin Transformer: shifted-window attention
morie_geron_swin_window_attention()
Swin windowed self-attention (morie.fn grswin)
morie_geron_swish()
Swish / SiLU activation (Geron Ch 11, morie.fn hmswi)
morie_geron_symbolic_diff()
Symbolic differentiation: manipulate algebraic expressions analytically
morie_geron_symbolic_differentiation()
Symbolic differentiation (Geron Ch 12, morie.fn grsmd)
morie_geron_symd_evaluate()
Evaluate a parsed tree against an environment (no eval/parse of R code)
morie_geron_symd_parse()
Parse an arithmetic expression string into an R tree
morie_geron_symd_to_string()
Render a parsed tree back to infix source
morie_geron_t5()
T5: text-to-text transfer transformer (encoder-decoder)
morie_geron_t5_restore()
Rebuild the original sequence from a T5-corrupted input and its target
morie_geron_tanh()
Hyperbolic tangent activation (Geron Ch 10, morie.fn hmtanh)
morie_geron_tanh_activation()
Hyperbolic tangent activation (morie.fn grtnh)
morie_geron_td3()
Twin delayed DDPG (TD3): two critics + delayed policy updates
morie_geron_td_learning()
TD(0) value update (Geron Ch 18, morie.fn hmtd)
morie_geron_td_zero_update()
TD(0) value update (Geron Ch 18, morie.fn grtd0)
morie_geron_temperature_sampling()
Temperature-scaled softmax (Geron Ch 16, morie.fn grtmp)
morie_geron_tensor_parallelism()
Tensor parallelism: split individual tensors across devices
morie_geron_threshold_logic_unit()
Threshold logic unit (Geron Ch 10, morie.fn grtlu)
morie_geron_time_series_forecast()
Time series forecasting with a fixed-width lag window
morie_geron_tlu()
Threshold logic unit (Geron Ch 10, morie.fn hmtlu)
morie_geron_topk_sampling()
Top-k truncated sampling distribution (morie.fn grtop)
morie_geron_torch_compile()
torch.compile: graph-capturing JIT for forward and backward passes
morie_geron_torchscript()
TorchScript: statically-typed graph representation of PyTorch models
morie_geron_trace()
Trace a typed graph by running model ops on example_inputs once
morie_geron_train_logreg()
Batch-GD logistic fit used by the OvR / OvO reductions (morie.fn grovr)
morie_geron_transfer_learning()
Transfer learning: reuse pretrained model, fine-tune on new task
morie_geron_transformer()
Transformer architecture (Vaswani et al. 2017)
morie_geron_transformer_decoder_block()
Transformer decoder block, post-norm (Geron Ch 16, morie.fn grtdb)
morie_geron_transformer_encoder_block()
Transformer encoder block, post-norm (Geron Ch 16, morie.fn grteb)
morie_geron_transformer_feedforward()
Transformer position-wise feed-forward (Geron Ch 16, morie.fn grffn)
morie_geron_tree_classification_leaf()
Classification tree leaf (Geron Ch 6, morie.fn grtrc)
morie_geron_tree_high_variance()
Decision-tree variance via bootstrap resampling of CART trees (hmdthv)
morie_geron_tree_regression_leaf()
Regression tree leaf (Geron Ch 6, morie.fn grtrv)
morie_geron_tree_regularization()
Tree regularization: constrained vs unconstrained CART (hmdtr)
morie_geron_tree_sensitivity_scale()
Decision-tree scale invariance: CART thresholds under x' = a*x + b (hmdtst)
morie_geron_trl_finetune()
Fine-tuning via TRL (Transformer Reinforcement Learning) library
morie_geron_tsne()
t-SNE: KL divergence between joint probabilities in high- and low-dim
morie_geron_umap()
UMAP: uniform manifold approximation, preserves local and some global structure
morie_geron_underfitting()
Underfitting diagnosis (Geron Ch 4, morie.fn hmuf)
morie_geron_unsupervised_learning()
Unsupervised learning: discover structure from unlabeled data
morie_geron_unsupervised_pretraining()
Unsupervised pretraining: learn representation via reconstruction before labels
morie_geron_vae()
Variational autoencoder with latent Gaussian prior
morie_geron_vae_elbo()
VAE evidence lower bound (Geron Ch 17, morie.fn grvae)
morie_geron_vae_loss_and_grads()
ELBO loss and exact gradients for fixed reparameterisation noise
morie_geron_value_function()
State value function by exact policy evaluation (Geron Ch 18, morie.fn hmvf)
morie_geron_value_iteration()
Value iteration on the Bellman optimality operator (Geron Ch 19, hmbel)
morie_geron_vanishing_gradients()
Vanishing gradients: small gradients shrink through many layers
morie_geron_variational_bayes_gmm()
Bayesian Gaussian mixture with variational inference (VBGMM)
morie_geron_videobert()
VideoBERT: transformer on discretized video tokens + text
morie_geron_vilbert()
ViLBERT: dual-stream vision-language transformer
morie_geron_vision_transformer()
Vision Transformer (ViT): transformer on image patches
morie_geron_vit_patch_embedding()
ViT patch embedding (Geron Ch 17, morie.fn grvit)
morie_geron_voting_hard()
Hard voting ensemble (Geron Ch 7, morie.fn hmvth)
morie_geron_vq_vae()
Discrete VAE (VQ-VAE): vector-quantized latents with codebook
morie_geron_warm_restarts()
Warm restarts: cosine decay with periodic restarts (SGDR)
morie_geron_weight_pruning()
Magnitude-based unstructured pruning (Geron Ch 19, morie.fn grprn)
morie_geron_word_embeddings()
Word embeddings: dense vector representations learned per token
morie_geron_wordpiece_tokenizer()
WordPiece tokenizer: maximum likelihood subword segmentation
morie_geron_wordpiece_tokenizer_score()
WordPiece merge score (Geron Ch 16, morie.fn grwpc)
morie_geron_xception()
Xception: extreme inception using depthwise separable convolutions
morie_geron_xgboost()
XGBoost: regularized gradient boosting with second-order Taylor approximation
morie_geron_xgboost_gain()
XGBoost regularized split gain (Geron Ch 7, morie.fn grxgbg)
morie_geron_xlnet()
XLNet: permutation-based autoregressive pretraining
morie_geron_yolo()
YOLO: single-shot object detection via grid regression
morie_geron_yolo_grid_loss()
YOLO grid loss (Geron Ch 14, morie.fn gryol)
morie_geron_zero_shot()
Zero-shot learning: LLM generalizes to unseen tasks from prompt only
morie_gh_crm_laplace_gamma()
Laplace exponent of a gamma completely random measure
morie_gh_dirichlet_moments()
First two moments of a Dirichlet distribution for a pair of cells
morie_gh_discrete_hazard()
Discrete hazard rates of a probability vector
morie_gh_dp_median_cdf()
Distribution function of the median of a Dirichlet process
morie_gh_dp_ndistinct()
Mean and variance of the number of distinct values in a DP sample
morie_gh_dp_posterior()
Dirichlet-process posterior for the mass of a single set
morie_gh_dp_predictive()
Polya-urn predictive weights of a Dirichlet process
morie_gh_eps_dp_size()
Stick-breaking truncation level for a given residual tolerance
morie_gh_ewens_log()
Log Ewens sampling formula for a partition given by multiplicities
morie_gh_hellinger2()
Half the squared Hellinger distance between two discrete distributions
morie_gh_ibp_expected_dishes()
Expected number of features in an Indian buffet process
morie_gh_kl()
Kullback-Leibler divergence between two discrete distributions
morie_gh_ncrm_laplace()
Laplace transform of a discretised completely random measure
morie_gh_pt_bits()
Leading binary-expansion bits of a point in the unit interval
morie_gh_pt_posterior_density()
Polya-tree posterior density at a point
morie_gh_py_eppf_log()
Log exchangeable partition probability function of a Pitman-Yor process
morie_gh_renyi()
Renyi divergence of order alpha between two discrete distributions
morie_gh_stick_breaking()
Stick-breaking weights from a vector of beta sticks
morie_gh_wn_posterior()
Conjugate posterior for one white-noise (normal mean) coordinate
morie_ghosal_adaptation()
Adaptive contraction rates over a smoothness grid
morie_ghosal_bernstein_von_mises()
BvM diagnostic for the mean functional under a DP prior
morie_ghosal_contraction_rate()
Minimax posterior-contraction rate
morie_ghosal_dirichlet_posterior()
Dirichlet-process posterior (conjugate update)
morie_ghosal_dpmixture_density()
DP mixture density estimate (Neal 2000 algorithm 3)
morie_ghosal_empirical_bayes()
Empirical-Bayes alpha MLE for a DP, given the observed K_n
morie_ghosal_gp_matern()
GP posterior mean with Matern kernel
morie_ghosal_gp_squared_exponential()
GP posterior mean with squared-exponential kernel
morie_ghosal_hierarchical_bayes()
Escobar-West augmentation for alpha given K_n with a Gamma(a, b) hyperprior
morie_ghosal_log_density()
Log-spline density estimator (Stone 1990, Ghosal Ch 8)
morie_ghosal_moment_matching()
Posterior mean / variance of G(A) for DP(alpha, G0) and A = (A_lower, A_upper]
morie_ghosal_neutral_right()
Neutral-to-the-right posterior survival (Doksum 1974)
morie_ghosal_np_classification()
Probit-GP classifier (Laplace approximation)
morie_ghosal_np_regression()
GP nonparametric regression
morie_ghosal_np_testing()
Polya-tree Bayes factor for H0: F = N(loc, scale^2)
morie_ghosal_posterior_consistency()
Schwartz posterior-consistency diagnostic (Bayesian bootstrap)
morie_ghosal_sieve_prior()
Bernstein-polynomial sieve density estimator (Petrone 1999)
morie_ghosal_stick_breaking_trunc()
Truncated stick-breaking representation of DP(alpha, G0)
morie_ghosal_survival_beta_process()
Beta-process posterior survival (Hjort 1990)
morie_ghosal_wavelet_prior()
Haar-wavelet spike-and-slab BayesThresh estimator (Abramovich 1998)
morie_gini_gamma()
Gini's gamma from a copula
morie_gllsuff()
Gaussian log likelihood in sufficient statistics (eq. 24.5-24.6, p. 319)
morie_glm_nb()
Native negative-binomial GLM (reproduces MASS::glm.nb)
morie_glmm()
Generalized linear mixed model by the Laplace approximation (native)
morie_glrtest()
Page likelihood-ratio CUSUM (Lai 1995, eq. 2.3)
morie_gm_error_sar()
Generalised-moments estimator for the spatial error model
morie_gmm_log_pdf()
Log density of a multivariate normal at every row of X (hmgmm)
morie_goodman_minimum()
Least monochromatic triangles in any two-colouring of K_n
morie_goodman_triangles()
Monochromatic triangles by Goodman's identity
morie_gp_density_rate()
Gaussian-process density contraction rate
morie_gpl_compatible_licenses()
Vector of SPDX identifiers recognised as GPL-compatible
morie_gr_dual()
Forward-mode autodiff dual number (morie.fn grfad Dual)
morie_gradient_boosting_ensemble()
Gradient boosting ensemble (R parity)
morie_gradient_boosting_genomic()
Gradient-boosting genomic predictor (Friedman 2001)
morie_gradient_descent_update()
Gradient-descent parameter update
morie_gradient_descent_vanilla()
Vanilla batch gradient descent for OLS (R parity)
morie_granger_test()
Granger causality F-test
morie_graphic_matroid()
The cycle matroid of a graph
morie_greedy_independent_set()
The greedy algorithm on an independence system
morie_greg()
Generalised regression (GREG) estimator
morie_greg_variance()
GREG variance estimators and g-weights
morie_grid_search_cv()
Grid search with cross-validation (R parity)
morie_grm_vanraden()
VanRaden Genomic Relationship Matrix
morie_grouptimeatt()
Group-time average treatment effects ATT(g, t)
morie_grphmr_centrality()
Graphormer centrality encoding
morie_grphmr_edge()
Edge-feature bias averaged along the shortest path
morie_grphmr_sp()
All-pairs shortest path distances
morie_grphmr_spatial()
Spatial bias from the shortest-path distance matrix
morie_gru4r_bpr()
BPR ranking loss
morie_gru4r_gru()
One GRU update (single layer)
morie_gru4r_mrr()
Mean reciprocal rank at k
morie_gru4r_recall()
Recall at k
morie_gru4r_top1()
TOP1 ranking loss
morie_gsageemd_layer()
One GraphSAGE layer
morie_gsageemd_loss()
Unsupervised graph-based loss
morie_gsageemd_sample()
Fixed-size neighbour sample
morie_gsplat_composite()
Front-to-back alpha compositing
morie_gsplat_covariance()
Build the 3D covariance as Sigma = R S S' R'
morie_gsplat_density()
Adaptive density control
morie_gsplat_project()
EWA projection of the 3D covariance
morie_gsplat_psd()
Positive semi-definiteness check
morie_gtrf_attention()
Neighbourhood-restricted attention
morie_gtrf_lap_pe()
Laplacian positional encoding
morie_gtrf_laplacian()
Graph Laplacian
morie_gtrf_layer()
Graph transformer layer
morie_gtrf_sign_flip()
Random sign flip
morie_gwasem_kinship_ibs()
IBS relatedness matrix
morie_gxe_interaction_model()
Two-way GxE ANOVA with EMS variance components
morie_hajek_mean()
Hajek ratio estimator of a population mean
morie_hall_condition()
Hall's marriage theorem
morie_hamming_bound()
The Hamming sphere-packing bound
morie_hapblk()
Gabriel et al. (2002) haplotype blocks
morie_happy_ending_quadrilateral()
The happy ending problem
morie_hardy_ramanujan_partitions()
Hardy-Ramanujan asymptotics for the partition function
morie_harrell_davis() morie_pbos() morie_mom_estimator() morie_one_step_m()
Robust measures of location
morie_has()
Are an example's prerequisites available?
morie_has_clique()
Does the graph contain a clique on k vertices?
morie_hawkes_baseline_integral_cpp
morie_hawkes_baseline_integral_cpp
morie_hawkes_fit()
Fit a Hawkes (self-exciting point process) model by maximum likelihood
morie_hawkes_kernel_cdf_cpp
morie_hawkes_kernel_cdf_cpp
morie_hawkes_kernel_density_cpp
morie_hawkes_kernel_density_cpp
morie_hawkes_ll_exp_const_cpp
morie_hawkes_ll_exp_const_cpp
morie_hawkes_ll_gamma_const_cpp
morie_hawkes_ll_gamma_const_cpp
morie_hawkes_ll_lomax_const_cpp
morie_hawkes_ll_lomax_const_cpp
morie_hawkes_ll_weibull_const_cpp
morie_hawkes_ll_weibull_const_cpp
morie_hawkes_pair_excitation_sum_cpp
morie_hawkes_pair_excitation_sum_cpp
morie_hawkes_st_fit()
Fit a spatiotemporal Hawkes process by maximum likelihood
morie_hawkes_st_intensity()
Conditional intensity of a spatiotemporal Hawkes process at a query point
morie_hawkes_st_loglik()
Log-likelihood of a spatiotemporal Hawkes process
morie_hawkes_st_simulate()
Simulate a spatiotemporal Hawkes process (immigrant-offspring branching)
morie_hazard_selection()
Built-in selection in period-by-period hazard ratios
morie_hbos()
HBOS – histogram-based outlier score
morie_hdbsc()
HDBSCAN* flat clustering by excess-of-mass stability extraction
morie_hedges_g()
Hedges' g (bias-corrected Cohen's d)
morie_helly_intervals()
Helly's theorem on the line
morie_heteroskedastic_scales()
Heteroskedastic IRT scales given ideal points (Lauderdale 2010)
morie_hits()
HITS hubs and authorities
morie_hlm_components()
Multilevel variance components, ICC and likelihood-ratio test
morie_hlmgr()
HLM T (tau) matrix by method of moments, with EB shrinkage
morie_hmac()
HMAC (digest's hmac, natively)
morie_hockey_stick()
Hockey-stick identity
morie_holt_linear()
Holt's linear trend exponential smoothing
morie_holt_winters()
Holt-Winters seasonal exponential smoothing
morie_holt_winters_additive()
Holt-Winters with additive seasonality
morie_holt_winters_mult()
Holt-Winters with multiplicative seasonality
morie_hook_lengths()
Hook length of every cell of a Young diagram
morie_horvitz_thompson()
Horvitz-Thompson estimator of a population total
morie_hosted_manifest() morie_hosted_datasets() morie_load_hosted_dataset()
Curated datasets at data.rmorie.com
morie_hot()
HOT SAX discord discovery
morie_hotspot_shrinkage()
Empirical-Bayes shrinkage of hot-spot counts: the expected size of the fall
morie_hotspot_threshold()
Hot-spot threshold of the Short-Brantingham reaction-diffusion model
morie_hsic()
Hilbert-Schmidt Independence Criterion
morie_hsicstat()
Hilbert-Schmidt independence criterion for an ANM residual test
morie_ht_elephant()
Basu's elephant: the Horvitz-Thompson total is unbiased with exploding variance
morie_ht_estimators()
Horvitz-Thompson estimators of the total and mean
morie_hte_blp_test()
Best-linear-predictor test for treatment-effect heterogeneity
morie_hurst_r()
Hurst exponent via rescaled-range (R/S) analysis
morie_hypergeometric_dist()
Hypergeometric pmf and its binomial limit
morie_ibdmtx()
Pairwise IBD matrix (PLINK method of moments)
morie_icc_rho()
Intracluster correlation and Kish's design effect
morie_ichimura()
Ichimura semiparametric least squares
morie_ideal_fourths() morie_idealf_iqr()
Ideal fourths and the interquartile range
morie_identify_estimate_refute()
Model, identify, estimate, refute
morie_ihstst()
Integrated haplotype score (iHS)
morie_impala_vtrace()
IMPALA V-trace off-policy targets
morie_impute_column()
Impute missing values in a column
morie_impute_untreated()
Impute untreated potential outcomes
morie_incapacitation()
Incapacitation arithmetic: crime rate, prevented share and the marginal year
morie_incapacitation_career()
Incapacitation under desistance and replacement
morie_inception_module()
GoogLeNet/Inception parameter count, module by module (hmgoog)
morie_incidence_check()
Verify a block design directly from its blocks
morie_indep_test()
Native general independence permutation test
morie_index_regression()
Single-index kernel regression
morie_indirect_effect_sobel()
Product-of-coefficients indirect effect with the Sobel standard error
morie_infer_measurement_level()
Infer the measurement level of a vector
morie_ingest_a2aj_citation_edges()
Citation network edges from A2AJ case records
morie_ingest_a2aj_coverage()
A2AJ corpus coverage
morie_ingest_a2aj_download()
Download one A2AJ dataset's Parquet file
morie_ingest_a2aj_fetch()
Fetch one A2AJ document by citation
morie_ingest_a2aj_gaps()
Courts and tribunals the A2AJ corpus does not carry
morie_ingest_a2aj_load()
Load one A2AJ dataset as a data.frame
morie_ingest_a2aj_search()
Search A2AJ case law or legislation
morie_ingest_a2aj_url()
Parquet URL of one A2AJ dataset
morie_ingest_bigquery_build_sql()
Build a parameter-safe BigQuery SELECT
morie_ingest_bigquery_query()
Execute a BigQuery SQL query and return a data.frame
morie_ingest_bigquery_table()
Pull a BigQuery table (or filtered slice) into a data.frame
morie_ingest_canlii_case()
Metadata of one CanLII decision
morie_ingest_canlii_case_id()
CanLII identifiers from a neutral citation
morie_ingest_canlii_cases()
Decisions of one CanLII database
morie_ingest_canlii_citator()
Citation network of one CanLII decision
morie_ingest_canlii_databases()
CanLII case-law databases
morie_ingest_canlii_legislation()
Metadata of one CanLII statute or regulation
morie_ingest_canlii_legislation_databases()
CanLII legislation databases
morie_ingest_canlii_legislations()
Statutes or regulations of one CanLII legislation database
morie_ingest_chicago_crime()
Pull the City of Chicago "Crimes - 2001 to Present" feed
morie_ingest_chicago_crime_bigquery()
BigQuery mirror of the Chicago crime feed
morie_ingest_chicago_resources()
Built-in Chicago / Socrata resource registry
morie_ingest_chicago_socrata()
Fetch every row from a Socrata SoDA JSON endpoint
morie_ingest_cihi_xlsx()
Download a CIHI indicator .xlsx data table
morie_ingest_ckan_fetch_package_csvs()
Fetch every CSV / TSV resource in a CKAN package
morie_ingest_ckan_package_search()
Search a CKAN portal for packages (raw)
morie_ingest_ckan_package_show()
Fetch one CKAN package's metadata
morie_ingest_ckan_read_resource()
Download a CKAN resource as a data.frame
morie_ingest_ckan_resource_show()
Fetch one CKAN resource's metadata
morie_ingest_ckan_search_packages()
Search a CKAN portal and return a flat metadata data.frame
morie_ingest_forensics_namus_missing()
Pull NamUs missing-persons case metadata
morie_ingest_forensics_nibrs()
Pull FBI NIBRS offence-event records via Crime Data Explorer
morie_ingest_forensics_nist_rds()
Pull NIST Reference Datasets (RDS) catalog metadata
morie_ingest_statcan_cansim()
Fetch a Statistics Canada NDM / cansim table
morie_ingest_statcan_csv()
Download a StatCan PUMF / CSV product
morie_ingest_statcan_vectors()
Fetch StatCan series by vector ID (keyless WDS, latest-N periods)
morie_ingest_tps_feature_layer()
Fetch every feature from a TPS ArcGIS FeatureServer layer
morie_ingest_tps_fetch()
Fetch a TPS open-data layer by short name
morie_ingest_tps_layers()
Built-in TPS open-data layer registry
morie_inspect_output()
Inspect a serialised analysis output (JSON, CSV, or RDS)
morie_inspection_game()
The criminal-citizen-inspector game cycles
morie_install_extras()
Install morie's optional dependencies (interactive helper)
morie_instrument_check()
Instrument relevance and exogeneity diagnostics
morie_instrumental_inequality()
Pearl's instrumental inequality on a finite table
morie_interracial_rates()
Interracial offending rates against the random-mixing null
morie_interventional_effects()
Interventional (randomised-mediator) direct and indirect effects
morie_invariance_compare()
Compare nested measurement-invariance models
morie_irt_2pl()
Fit a two-parameter logistic (2PL) IRT model
morie_irt_eap()
EAP ability scores for new respondents under a fitted 2PL model
morie_irt_grm()
Fit Samejima's graded response model (GRM)
morie_irt_marginal_reliability()
Marginal reliability of an item response theory scale
morie_irt_theta_se()
Standard error of an item response theory score
morie_is_backdoor_admissible()
Does Z satisfy Pearl's back-door criterion?
morie_is_latin_square()
Is every symbol used once in each row and each column?
morie_is_matroid()
Check the two matroid axioms directly
morie_is_over_legal_limit()
Test whether an eBAC exceeds a legal driving limit
morie_isolation_forest()
Isolation forest
morie_itrans()
iTransformer: variates as tokens, attention across variates
morie_its()
Interrupted time-series analysis (segmented regression)
morie_iv_2sls()
Two-stage least squares with a weak-instrument refusal gate
morie_iv_anderson_rubin()
Anderson-Rubin (AR) weak-IV-robust test
morie_iv_anderson_rubin_ci()
Grid-based Anderson-Rubin confidence interval for a single endogenous variable
morie_iv_conditional_lr()
Conditional likelihood-ratio (CLR) test of Moreira (2003)
morie_iv_cragg_donald()
Cragg-Donald weak-instrument F statistic
morie_iv_cue_gmm()
Continuously-Updated GMM (CUE-GMM)
morie_iv_diagnostics()
Composite IV diagnostics
morie_iv_durbin_wu_hausman()
Durbin-Wu-Hausman test of endogeneity
morie_iv_first_stage_diagnostics()
First-stage F-statistics and partial R^2
morie_iv_gmm()
Generalised Method of Moments (GMM) IV
morie_iv_hansen_j()
Hansen J test of overidentifying restrictions (robust)
morie_iv_hausman()
Hausman test: OLS vs 2SLS
morie_iv_jive()
Jackknife IV (JIVE; Angrist, Imbens & Krueger 1999)
morie_iv_kleibergen_paap()
Kleibergen-Paap rk statistic and rk Wald F for weak identification
morie_iv_liml()
Limited-Information Maximum Likelihood (LIML)
morie_iv_montiel_olea_pflueger()
Montiel Olea-Pflueger effective F test for weak instruments
morie_iv_natural_bounds()
Instrumental-variable natural bounds
morie_iv_panel()
Panel IV with unit (and optional time) fixed effects via within-transform
morie_iv_probit()
IV Probit (Rivers-Vuong control function)
morie_iv_residual_analysis()
IV residual analysis
morie_iv_sargan()
Sargan test of overidentifying restrictions (homoskedastic)
morie_iv_split_sample()
Split-sample IV
morie_iv_stock_yogo()
Stock-Yogo critical values (TSLS maximal size, one endogenous regressor)
morie_iv_tsls()
Two-Stage Least Squares (2SLS)
morie_iv_wald()
Wald (single-instrument) estimator
morie_jackknife_estimate()
Delete-1 jackknife variance estimate
morie_jacquez_knn()
Jacquez k-nearest-neighbour test for space-time interaction
morie_jnpnt()
Joinpoint regression for survival hazard trends
morie_johansen_cointegration()
Johansen trace test for cointegration
morie_joint_convergence()
Joint convergence of parameter and nuisance
morie_joseph_croston_intermittent()
Croston with demand classification
morie_joseph_mint_reconciliation()
MinT / OLS / WLS forecast reconciliation
morie_joseph_naive_forecast()
Naive and seasonal-naive forecast
morie_joseph_simple_exponential_smoothing()
Simple exponential smoothing
morie_joseph_ts_outlier_detection()
Rolling-median outlier detection for a time series
morie_json_stringify()
Serialize an R object to JSON natively (pure R)
morie_jsonlt_base64_dec() morie_jsonlt_base64url_dec()
Base64 decode to a raw vector
morie_jsonlt_base64_enc() morie_jsonlt_base64url_enc()
Base64 encode a raw vector or character string
morie_jsonlt_rbind_pages()
Row-bind a list of data.frames with differing columns (jsonlite's rbind_pages)
morie_jsonlt_read_json() morie_jsonlt_write_json()
Read and write JSON files
morie_jsonlt_stream_in() morie_jsonlt_stream_out()
Stream newline-delimited JSON (jsonlite's stream_in / stream_out)
morie_jsonlt_validate()
Validate JSON text
morie_judge_iv()
Judge-leniency instrument on observed data: Wald ratio, compliers and the defier sensitivity
morie_judge_iv_population()
Judge-leniency instrument on a known population: the exact decomposition
morie_judge_monotonicity()
Monotonicity of judges without outcomes: do the leniency rankings hold in every subgroup?
morie_judge_slope_test()
The many-judge slope test of monotonicity
morie_kalman_filter()
Kalman filter predict-update for a linear-Gaussian state-space model
morie_kamath_3h_alignment()
3H alignment score (Kamath Ch 5)
morie_kamath_adalora_rank_allocation()
AdaLoRA SVD update with importance-based pruning (Kamath Ch 4)
morie_kamath_alibi_bias()
ALiBi biased attention (Kamath Ch 2)
morie_kamath_autoprompt_gradient_search()
AutoPrompt trigger search (Kamath Ch 3)
morie_kamath_bertscore()
BERTScore end to end (Kamath Ch 8)
morie_kamath_best_of_n_sampling()
Best-of-N sampling (Kamath Ch 5)
morie_kamath_bleu_score()
Corpus-level BLEU (Kamath Ch 8)
morie_kamath_bm25_score()
BM25 relevance score (Kamath Ch 7)
morie_kamath_bradley_terry_preference()
Bradley-Terry preference probability, vectorised (Kamath Ch 5)
morie_kamath_ch3_back_translation_prob()
Round-trip back-translation prompt score (Kamath Eq 3.9)
morie_kamath_ch3_dante_cloze()
Cloze knowledge probe (Kamath Eq 3.4)
morie_kamath_ch3_prefix_prompt_template() morie_kamath_ch3_translate_prefix_prompt() morie_kamath_ch3_cloze_prompt_template()
Ch 3 prompt templates (Kamath Eq 3.5-3.7)
morie_kamath_ch3_prefix_tuning_obj()
Prefix-tuning objective (Kamath Eq 3.12)
morie_kamath_ch3_prompt_label_mapping()
Prompt-based classification through a label word map (Kamath Eq 3.1)
morie_kamath_ch3_prompt_search_argmax()
Answer search over filled prompts (Kamath Eq 3.3)
morie_kamath_ch3_prompt_softmax_label()
Label-word softmax (Kamath Eq 3.2)
morie_kamath_ch3_qa_trigger_template()
Adversarial-trigger QA prompt (Kamath Eq 3.10)
morie_kamath_ch3_t5_template_obj()
T5 template generation objective (Kamath Eq 3.11)
morie_kamath_ch3_top1_prompt_metric()
Top-1 prompt selection accuracy (Kamath Eq 3.8)
morie_kamath_ch4_full_finetune_obj() morie_kamath_ch4_lora_obj()
Fine-tuning objectives (Kamath Eq 4.3-4.4)
morie_kamath_ch4_krona_efficient()
KronA matrix-free product (Kamath Eq 4.7)
morie_kamath_ch4_krona_tuned_weights() morie_kamath_ch4_krona_output()
KronA layer output and merged weights (Kamath Eq 4.8-4.9)
morie_kamath_ch4_kronecker_product()
Kronecker product (Kamath Eq 4.6)
morie_kamath_ch4_loftq_objective()
LoftQ Frobenius objective (Kamath Eq 4.11)
morie_kamath_ch4_lora_forward()
LoRA forward pass (Kamath Eq 4.5)
morie_kamath_ch4_series_adapter() morie_kamath_ch4_parallel_adapter()
Bottleneck adapters (Kamath Eq 4.1-4.2)
morie_kamath_ch4_vera_forward()
VeRA forward pass (Kamath Eq 4.10)
morie_kamath_ch5_bradley_terry_pref() morie_kamath_ch5_pref_sigmoid_form()
Bradley-Terry preference probability (Kamath Eq 5.8-5.9)
morie_kamath_ch5_dpo_loss()
DPO loss (Kamath Eq 5.12)
morie_kamath_ch5_dpo_pref_simplified() morie_kamath_ch5_dpo_pref_substituted()
DPO preference probability (Kamath Eq 5.10-5.11)
morie_kamath_ch5_dpo_reward_optimal()
Reward implied by an optimal policy (Kamath Eq 5.7)
morie_kamath_ch5_reward_kl_penalty()
KL-penalised RLHF reward (Kamath Eq 5.2)
morie_kamath_ch5_reward_loss_pairwise() morie_kamath_ch5_rm_bradley_terry()
Pairwise reward-model losses (Kamath Eq 5.1, 5.3)
morie_kamath_ch5_rlhf_objective() morie_kamath_ch5_ppo_loss()
RLHF objective and PPO loss (Kamath Eq 5.4-5.5)
morie_kamath_ch5_rlhf_optimal_policy()
Optimal KL-regularised policy (Kamath Eq 5.6)
morie_kamath_ch6_alignment_function()
AlignScore alignment function (Kamath Eq 6.2)
morie_kamath_ch6_alignscore_total_loss()
AlignScore joint loss (Kamath Eq 6.3)
morie_kamath_ch6_cat_metric()
Context Association Test score (Kamath Eq 6.12)
morie_kamath_ch6_cbs_variance()
Categorical Bias Score (Kamath Eq 6.9)
morie_kamath_ch6_ceat_random_effects()
CEAT random-effects pooled WEAT (Kamath Eq 6.7)
morie_kamath_ch6_co_occurrence_bias()
Co-Occurrence Bias Score (Kamath Eq 6.14)
morie_kamath_ch6_debias_regularizer() morie_kamath_ch6_gender_direction()
Counterfactual-pair debiasing and the gender direction (Eq 6.18-6.19)
morie_kamath_ch6_demographic_representation() morie_kamath_ch6_stereotypical_assoc()
Demographic representation and stereotypical association (Eq 6.15-6.16)
morie_kamath_ch6_differential_privacy()
Differential privacy check (Kamath Eq 6.32)
morie_kamath_ch6_ear_entropy_reg()
Entropy-based attention regularisation (Kamath Eq 6.21)
morie_kamath_ch6_emt_metric() morie_kamath_ch6_toxic_fraction() morie_kamath_ch6_toxicity_probability()
Toxicity metrics (Kamath Eq 6.23-6.25)
morie_kamath_ch6_factscore()
FActScore (Kamath Eq 6.1)
morie_kamath_ch6_gedi_combined_loss()
GeDi combined loss (Kamath Eq 6.29)
morie_kamath_ch6_gender_projection_reg()
Gender-projection regulariser (Kamath Eq 6.20)
morie_kamath_ch6_honest_score()
HONEST score (Kamath Eq 6.17)
morie_kamath_ch6_log_prob_ratio_attr()
Equalising log-probability-ratio regulariser (Kamath Eq 6.22)
morie_kamath_ch6_lpbs_bias()
Log-Probability Bias Score (Kamath Eq 6.8)
morie_kamath_ch6_lstm_chain_rule()
Chain-rule sequence probability (Kamath Eq 6.26)
morie_kamath_ch6_lstm_softmax_word() morie_kamath_ch6_affect_lm()
LSTM vocabulary softmax and Affect-LM (Kamath Eq 6.27-6.28)
morie_kamath_ch6_perplexity_leakage()
Worst-case perplexity leakage (Kamath Eq 6.33)
morie_kamath_ch6_pii_likelihood()
ProPILE PII likelihood (Kamath Eq 6.31)
morie_kamath_ch6_pll() morie_kamath_ch6_cps_metric()
Pseudo-log-likelihood and CrowS-Pairs (Kamath Eq 6.10-6.11)
morie_kamath_ch6_self_diagnosis_prob()
Self-diagnosis probability (Kamath Eq 6.30)
morie_kamath_ch6_sgs_invariance()
Social Group Substitution invariance (Kamath Eq 6.13)
morie_kamath_ch6_weat_effect_size()
WEAT effect size (Kamath Eq 6.6)
morie_kamath_ch6_weat_function()
WEAT test statistic (Kamath Eq 6.4)
morie_kamath_ch6_weat_similarity()
WEAT differential association (Kamath Eq 6.5)
morie_kamath_ch7_answer_relevance()
RAGAS answer relevance (Kamath Eq 7.3)
morie_kamath_ch7_faithfulness_metric()
RAG faithfulness (Kamath Eq 7.2)
morie_kamath_ch8_bertscore_recall() morie_kamath_ch8_bertscore_precision() morie_kamath_ch8_bertscore_f1()
BERTScore recall, precision and F1 (Kamath Eq 8.7-8.9)
morie_kamath_ch8_bleu_n_geom_mean() morie_kamath_ch8_bleu_final()
BLEU geometric mean and final score (Kamath Eq 8.3, 8.5)
morie_kamath_ch8_bleu_precision()
BLEU clipped n-gram precision (Kamath Eq 8.2)
morie_kamath_ch8_brevity_penalty()
BLEU brevity penalty (Kamath Eq 8.4)
morie_kamath_ch8_geval_score()
G-Eval probability-weighted score (Kamath Eq 8.15)
morie_kamath_ch8_moverscore_distance() morie_kamath_ch8_smd()
MoverScore n-gram distance and Sentence Mover's Distance (Eq 8.11, 8.14)
morie_kamath_ch8_ngram_embedding()
MoverScore n-gram embedding (Kamath Eq 8.12)
morie_kamath_ch8_ngram_weight()
MoverScore n-gram weight (Kamath Eq 8.13)
morie_kamath_ch8_pass_at_k() morie_kamath_pass_at_k()
Unbiased pass@k (Kamath Eq 8.16)
morie_kamath_ch8_perplexity()
Perplexity from token probabilities (Kamath Eq 8.1)
morie_kamath_ch8_rouge_n()
ROUGE-N recall over multiple references (Kamath Eq 8.6)
morie_kamath_ch8_wmd()
Word Mover's Distance as an exact transport LP (Kamath Eq 8.10)
morie_kamath_ch9_clip_image_to_text() morie_kamath_ch9_clip_text_to_image() morie_kamath_ch9_clip_contrastive_total()
CLIP contrastive losses (Kamath Eq 9.5-9.7)
morie_kamath_ch9_flamingo_factorized() morie_kamath_ch9_flamingo_dataset_mix()
Flamingo factorized likelihood and dataset mix (Kamath Eq 9.21-9.22)
morie_kamath_ch9_fom_loss()
Frame order modelling loss (Kamath Eq 9.15)
morie_kamath_ch9_input_alignment_loss()
Input-alignment text-generation objective (Kamath Eq 9.2)
morie_kamath_ch9_input_projector() morie_kamath_ch9_output_alignment()
Input and output projectors (Kamath Eq 9.3, 9.19)
morie_kamath_ch9_itm_loss()
Image-text matching binary loss (Kamath Eq 9.13)
morie_kamath_ch9_ldm_loss()
Conditional LDM noise-prediction loss (Kamath Eq 9.20)
morie_kamath_ch9_llm_signal_tokens()
LLM text and signal tokens (Kamath Eq 9.4)
morie_kamath_ch9_mm_instr_predict()
Multimodal instruction-tuned prediction (Kamath Eq 9.16)
morie_kamath_ch9_mml_vlm_loss() morie_kamath_ch9_itm_hard_negative()
Visual-linguistic matching losses (Kamath Eq 9.8-9.9)
morie_kamath_ch9_mmllm_autoregressive() morie_kamath_ch9_itg_loss()
Autoregressive response losses (Kamath Eq 9.14, 9.17)
morie_kamath_ch9_moc_loss()
Masked object classification loss (Kamath Eq 9.12)
morie_kamath_ch9_modality_encoder()
Modality encoder (Kamath Eq 9.1)
morie_kamath_ch9_output_projector_mse()
Output-projector MSE objective (Kamath Eq 9.18)
morie_kamath_ch9_simvlm_mlm()
SimVLM masked-token loss with visual conditioning (Kamath Eq 9.10)
morie_kamath_ch9_simvlm_prefixlm()
PrefixLM suffix negative log-likelihood (Kamath Eq 9.11)
morie_kamath_chain_of_thought()
Zero-shot chain-of-thought prompting (Kamath Ch 4)
morie_kamath_chinchilla_compute_optimal()
Chinchilla compute-optimal split (Kamath Ch 1)
morie_kamath_christiano_deep_rl_feedback()
Preference-based reward learning (Kamath Ch 5)
morie_kamath_constitutional_ai_loop()
Constitutional AI critique-revise loop (Kamath Ch 5)
morie_kamath_corrective_rag()
Corrective RAG retrieval router (Kamath Ch 7)
morie_kamath_cross_encoder_rerank()
Cross-encoder re-ranking (Kamath Ch 7)
morie_kamath_crowspairs_bias()
CrowS-Pairs stereotype preference rate (Kamath Ch 6)
morie_kamath_dense_passage_retrieval()
Dense passage retrieval top-k (Kamath Ch 7)
morie_kamath_differential_privacy()
(eps, delta)-DP definition check (Kamath Ch 6)
morie_kamath_double_quantization()
Double quantization of the scale constants (Kamath Ch 4)
morie_kamath_dpo_loss()
DPO loss from log-probabilities (Kamath Ch 5)
morie_kamath_emergent_abilities()
Emergent-ability step metric (Kamath Ch 1)
morie_kamath_expert_capacity_factor()
MoE per-expert capacity (Kamath Ch 2)
morie_kamath_factscore()
FactScore over atomic claims (Kamath Ch 6)
morie_kamath_fasttext_subword() morie_kamath_word_ngrams()
FastText subword sum (Kamath Ch 2)
morie_kamath_few_shot_exemplar_selection()
Top-K few-shot exemplar selection (Kamath Ch 3)
morie_kamath_g_eval()
G-Eval rubric score from judge logits (Kamath Ch 8)
morie_kamath_glove_cost() morie_kamath_glove_weight()
GloVe weighted least-squares cost (Kamath Ch 2)
morie_kamath_groundedness_reward()
Groundedness reward (Kamath Ch 7)
morie_kamath_houlsby_adapter()
Houlsby bottleneck adapter (Kamath Ch 4)
morie_kamath_hybrid_retrieval_fusion()
Hybrid dense/sparse score fusion (Kamath Ch 7)
morie_kamath_hyde_hypothetical_doc()
HyDE retrieval via a hypothetical document (Kamath Ch 7)
morie_kamath_image_text_contrastive()
Image-text contrastive loss (Kamath Ch 9)
morie_kamath_image_text_matching()
Image-text matching head (Kamath Ch 9)
morie_kamath_in_context_learning_prob()
In-context learning conditional probability (Kamath Ch 3)
morie_kamath_instruction_tuning_loss()
Instruction-tuning cross entropy (Kamath Ch 4)
morie_kamath_kl_reward_shaping()
KL-shaped RLHF reward (Kamath Ch 5)
morie_kamath_llava_visual_instruction()
LLaVA visual instruction assembly (Kamath Ch 9)
morie_kamath_lora_weight_update()
LoRA forward with alpha/r scaling (Kamath Ch 4)
morie_kamath_mamba_ssm()
Mamba selective SSM scan (Kamath Ch 2)
morie_kamath_medusa_heads()
Medusa multi-head speculative prediction (Kamath Ch 8)
morie_kamath_membership_inference()
Membership inference by loss threshold (Kamath Ch 6)
morie_kamath_memorization_exposure()
Canary exposure (Kamath Ch 6)
morie_kamath_moe_load_balance_loss()
MoE auxiliary load-balancing loss (Kamath Ch 2)
morie_kamath_moe_router_softmax()
Softmax top-k MoE router (Kamath Ch 2)
morie_kamath_moe_top_k_gating()
Top-k gate renormalisation (Kamath Ch 2)
morie_kamath_moverscore() morie_kamath_word_movers_distance()
MoverScore from exact Word Mover's Distance (Kamath Ch 8)
morie_kamath_multimodal_mae()
Multimodal MAE squared reconstruction loss (Kamath Ch 9)
morie_kamath_nextgpt_any2any()
NExT-GPT any-to-any pipeline (Kamath Ch 9)
morie_kamath_nf4_datatype() morie_kamath_normal_quantile()
NF4 equal-mass normal quantile grid (Kamath Ch 4)
morie_kamath_ngram_language_model()
N-gram MLE conditional probability (Kamath Ch 2)
morie_kamath_nucleus_sampling()
Nucleus (top-p) truncation (Kamath Ch 8)
morie_kamath_p_tuning_v2()
P-tuning v2 deep prefix concatenation (Kamath Ch 4)
morie_kamath_perplexity()
Perplexity from log-probabilities (Kamath Ch 8)
morie_kamath_pet_loss()
PET loss (Kamath Ch 3)
morie_kamath_post_ln_transformer() morie_kamath_pre_ln_transformer() morie_kamath_layer_norm_rows()
Post-LN and pre-LN transformer blocks (Kamath Ch 2)
morie_kamath_ppo_rlhf_objective()
PPO-RLHF objective (Kamath Ch 5)
morie_kamath_prefix_tuning()
Prefix tuning key/value concatenation (Kamath Ch 4)
morie_kamath_prompt_tuning()
Prompt tuning soft-prompt prepend (Kamath Ch 4)
morie_kamath_q_former()
Q-Former cross-attention (Kamath Ch 9)
morie_kamath_qlora_4bit() morie_kamath_dequantize_nf4()
QLoRA 4-bit forward (Kamath Ch 4)
morie_kamath_ragas_answer_relevance()
RAGAS answer relevance from a reverse-question model (Kamath Ch 7)
morie_kamath_ragas_context_relevance()
RAGAS context relevance (Kamath Ch 7)
morie_kamath_reciprocal_rank_fusion()
Reciprocal rank fusion (Kamath Ch 7)
morie_kamath_rejection_sampling_finetune()
Rejection-sampling fine-tuning (Kamath Ch 5)
morie_kamath_retnet_retention()
RetNet retention (Kamath Ch 2)
morie_kamath_reward_model_training_loss()
Bradley-Terry reward-model NLL over preference pairs (Kamath Ch 5)
morie_kamath_rlaif_objective()
RLAIF Bradley-Terry reward fit (Kamath Ch 5)
morie_kamath_rlhf_pipeline()
RLHF pipeline SFT -> RM -> PPO (Kamath Ch 5)
morie_kamath_rms_norm()
RMSNorm (Kamath Ch 2)
morie_kamath_rotary_positional_embedding()
Rotary positional embedding (Kamath Ch 2)
morie_kamath_rouge_n()
ROUGE-N against a single reference (Kamath Ch 8)
morie_kamath_rwkv_time_mix()
RWKV time-mixing (Kamath Ch 2)
morie_kamath_scaling_laws()
Power-law scaling (Kamath Ch 1)
morie_kamath_self_consistency()
Self-consistency majority vote (Kamath Ch 4)
morie_kamath_self_rag()
Self-RAG reflection-token decisions (Kamath Ch 7)
morie_kamath_sentencepiece_tokenizer()
SentencePiece unigram trainer (Kamath Ch 2)
morie_kamath_speculative_decoding()
Speculative decoding accept/reject (Kamath Ch 8)
morie_kamath_step_back_prompting()
Step-back prompting (Kamath Ch 4)
morie_kamath_stereoset_bias()
StereoSet stereotype-preference fraction (Kamath Ch 6)
morie_kamath_summarize_from_feedback()
Summarisation from human feedback (Kamath Ch 5)
morie_kamath_swiglu_activation() morie_kamath_swish()
SwiGLU activation (Kamath Ch 2)
morie_kamath_t5_span_corruption()
T5 span corruption (Kamath Ch 2)
morie_kamath_temperature_sampling()
Temperature-scaled softmax (Kamath Ch 8)
morie_kamath_toxigen_score()
ToxiGen classifier toxicity probability (Kamath Ch 6)
morie_kamath_tree_of_thoughts()
Tree-of-thoughts beam search (Kamath Ch 4)
morie_kamath_unigram_lm_tokenizer() morie_kamath_unigram_loglik() morie_kamath_viterbi_segment()
Unigram LM tokenizer by EM (Kamath Ch 2)
morie_kamath_vera_adapter()
VeRA adapter (Kamath Ch 4)
morie_kamath_verbalizer_mapping()
Verbalizer class probabilities (Kamath Ch 3)
morie_kamath_word2vec_skipgram()
Skip-gram log-likelihood with the full softmax (Kamath Ch 2)
morie_kamath_yarn_context_extrapolation()
YaRN NTK-aware RoPE frequency rescaling (Kamath Ch 2)
morie_kaplan_meier() morie_survival_km()
Kaplan-Meier product-limit estimator
morie_kcusum()
Kernel change-point analysis (KFDR scan)
morie_kde2d()
Native 2-D kernel density estimate (reproduces MASS::kde2d)
morie_kde_h()
Kernel density estimate with the Silverman bandwidth
morie_kendall_tau()
Kendall's tau-b
morie_kendall_tau_partial()
Kendall partial-tau correlation (Gibbons Ch 12.6)
morie_kernel_matrix() morie_rkhs_fit() morie_rkhs_predict() morie_rkhs_mixed_equations() morie_arccos_kernel() morie_bayesian_kernel_blup() morie_kernel_blup_gxe() morie_kernel_blup_replicated() morie_kernel_eigen_design() morie_nystrom() morie_sparse_kernel_design()
Kernel and RKHS methods
morie_kernel_pca()
Kernel principal components analysis via kernlab
morie_kernel_quantile()
Conditional quantile by inverting a kernel CDF
morie_km_hadamard()
Kaplan-Meier Hadamard derivative
morie_km_native()
Kaplan-Meier product-limit estimator, computed natively
morie_kmeans_clustering()
K-means clustering (R parity)
morie_kmt_bound()
KMT strong-approximation bound
morie_knn_entropy()
Kozachenko-Leonenko k-nearest-neighbour differential entropy
morie_konig_theorem()
Konig's theorem: maximum matching equals minimum vertex cover
morie_kriging()
Ordinary kriging system, variances, and the exponential semivariogram
morie_kriging_pred_error()
Ordinary kriging with a Prasad-Rao corrected prediction error
morie_kruskal_wallis_test()
Kruskal-Wallis non-parametric ANOVA
morie_ks_limit()
Kolmogorov-Smirnov limits and exact one-sided tail
morie_kupiec_var_test()
Kupiec unconditional-coverage LR test for VaR exceedances
morie_lagfeat()
Lag features (ch. 6 p. 170)
morie_lamb()
LAMB layer-wise adaptive moments
morie_laniyonu_actuarial_risk_disparity()
Replication of O'Connell & Laniyonu (2025) – CSC actuarial-risk disparity
morie_laniyonu_gentrification_policing()
Replication of Laniyonu (2018) – Coffee Shops and Street Stops
morie_laniyonu_smi_force_disparity()
Replication of Laniyonu & Goff (2021) – Police force vs SMI disparity
morie_laplace_noise()
One draw from Lap(0, b) by inverse transform
morie_laplc()
Laplace mechanism (primary entry point)
morie_lars()
LARS layer-wise adaptive rate scaling
morie_lasso_path()
Coordinate-descent lasso path
morie_latin_square()
A Latin square of order n
morie_lattice_convex_hull()
Convex hull of lattice points by Andrew's monotone chain
morie_lcg_normal()
Deterministic standard normals from the shared LCG + Box-Muller (hmdfw)
morie_lcmm_latent_class()
Latent-class mixed models via lcmm
morie_ld()
Linkage disequilibrium (r-squared) between two loci
morie_ld50()
Median lethal dose from a quantal assay
morie_ldiff()
l-diversity of an anonymised release
morie_learning_curve()
Learning curve – train / val MSE vs training-set size (R parity)
morie_least_squares()
Least-squares line and sample correlation
morie_levene_test()
Levene test for equality of variances
morie_lewbel_binary()
Lewbel's special-regressor estimator for binary response
morie_license_metadata()
morie's SPDX-style licence metadata
morie_lil_ratio()
Law of the iterated logarithm ratio and the Chung liminf constant
morie_linear_corr_model()
The Y = mX + Z correlation model
morie_linear_regression_ols()
Ordinary least squares closed-form solution (R parity)
morie_linevid()
Marginal likelihood of a straight-line model (eq. 28.22, Ex. 28.2, p. 352)
morie_linkhae()
Haebara characteristic-curve IRT linking
morie_linkmm()
IRT moment linking (mean/mean, mean/sigma)
morie_linkqp()
Stocking-Lord characteristic-curve IRT linking
morie_list_datasets()
List all datasets with cache status
morie_list_morie_modules()
List implemented MORIE CPADS modules
morie_llm_agent_available()
Return TRUE when a language model is set up
morie_llm_ask()
Send a prompt to a language model
morie_llm_ask_multi()
Ask a language model with a whole conversation
morie_llm_backend() morie_llm_models() morie_llm_chat()
Bring-your-own language model: backend, model list and chat
morie_llm_config()
Show or save the language-model settings
morie_llm_detect_provider()
The language-model route that would answer
morie_llm_login()
Sign in for the curated tables at data.rmorie.com
morie_llm_logout()
Forget the stored data key
morie_llm_ollama_models()
List the models an Ollama server is serving
morie_llm_probe_ollama()
Probe a local Ollama instance
morie_llm_provider_set() morie_llm_provider_show() morie_llm_provider_unset()
Attach your own model endpoint
morie_llm_request_completion()
POST a chat-completion request to an OpenAI-compatible endpoint
morie_lm()
Fit a regression model with a full model-object contract
morie_lm_scaling()
Scaling of a morie_lm fit with the number of observations
morie_lmm()
Linear mixed-effects model (native, lme4/nlme compatible)
morie_lms_error()
LMS instantaneous error and gradient
morie_load_cpads()
Load CPADS data: local files -> cache -> CKAN API
morie_load_cpads_data()
Load the real CPADS CSV from this repository
morie_load_dataset()
Load a dataset by catalog key
morie_local_dp_randomised_response()
k-ary randomised response (local differential privacy)
morie_local_linear()
Local linear regression
morie_local_outlier_factor()
Local outlier factor
morie_locfdr_estimate()
Local FDR estimation via locfdr
morie_locp()
Local polynomial regression smoother
morie_logistic_effects()
Logistic regression effect and fit statistics
morie_logistic_fit()
Logistic regression model, likelihood, and MLE
morie_logistic_wald()
Logistic-scale Wald intervals for odds ratios and probabilities
morie_logit_link()
Logit link utilities
morie_logit_rescale()
Rescaling of logit coefficients across nested models
morie_logit_separation()
Detect separation in a logistic regression and show why the fit cannot converge
morie_logrank_test() morie_survival_logrank()
Log-rank test
morie_logtrans()
Log transformation with an optional offset (ch. 6 p. 163)
morie_lord_chisq()
Lord's chi-square test for differential item functioning
morie_loss_stream_variance()
Variance of a training-loss stream, keeping the correlation
morie_lovasz_local_lemma()
The symmetric Lovasz Local Lemma
morie_lrprod()
Posterior odds as a running product of ratios (eq. 3.31, p. 63)
morie_m_normality()
M-estimator asymptotic normality
morie_mad() morie_madn() morie_mad_rescaled() morie_mad_median_rule()
Median absolute deviation and the MAD-median outlier rule
morie_make_raw()
Coerce to raw the way digest::makeRaw does
morie_mann_whitney_test()
Mann-Whitney U test (Wilcoxon rank-sum)
morie_manski()
Manski no-assumption bounds on the average treatment effect
morie_manskif()
Manski worst-case bounds (full interface)
morie_mantel_number()
Mantel's theorem: the triangle-free case
morie_mapets()
Mean absolute percentage error (ch. 19 p. 568)
morie_marginal_integration()
Marginal integration for a nonparametric additive model
morie_msm_linear() morie_msm_logistic() morie_msm_poisson() morie_msm_negative_binomial() morie_msm_cox_marginal() morie_msm_accelerated_failure() morie_msm_gmm_estimator() morie_msm_time_varying_exposure()
Marginal structural models
morie_marginals_verify()
Verify recoded category counts against the counts a release published
morie_marker_variance()
Marker variance-component estimation
morie_matching_abadie_imbens_kernel_cpp
morie_matching_abadie_imbens_kernel_cpp
morie_matching_abadie_imbens_se()
Abadie-Imbens standard error for matching estimators
morie_matching_atc_matched()
ATC from a matched sample
morie_matching_ate_matched()
ATE from a matched / weighted sample
morie_matching_att_matched()
ATT from a matched sample
morie_matching_balance()
Balance diagnostics for matched / weighted samples
morie_matching_balance_table()
Publication-ready balance table
morie_matching_cardinality()
Cardinality matching
morie_matching_cem()
Coarsened Exact Matching (CEM)
morie_matching_cem_strata_cpp
morie_matching_cem_strata_cpp
morie_matching_common_support()
Restrict a sample to the region of common support
morie_matching_doubly_robust()
Doubly-robust ATT combining matching and regression
morie_matching_entropy_balance()
Entropy balancing weights (Hainmueller, 2012)
morie_matching_estimate_propensity()
Estimate propensity scores
morie_matching_euclidean_pairs_cpp
morie_matching_euclidean_pairs_cpp
morie_matching_exact()
Exact matching on discrete covariates
morie_matching_full()
Optimal full matching
morie_matching_genetic()
Genetic matching (Diamond & Sekhon, 2013)
morie_matching_longitudinal()
Longitudinal matching for panel data
morie_matching_love_plot_data()
Love-plot data: pre- vs post-matching balance
morie_matching_mahalanobis()
Mahalanobis distance matching
morie_matching_mahalanobis_pairs_cpp
morie_matching_mahalanobis_pairs_cpp
morie_matching_multi_treatment()
Matching with multiple (> 2) treatment groups
morie_matching_nearest_neighbor()
Nearest-neighbour propensity-score matching
morie_matching_nn_select_cpp
morie_matching_nn_select_cpp
morie_matching_optimal_pair()
Optimal pair matching
morie_matching_overlap()
Propensity-score overlap diagnostics
morie_matching_quality()
Comprehensive matching-quality assessment
morie_matching_rosenbaum_bounds()
Rosenbaum bounds for hidden bias
morie_matching_subclassify()
Subclassification (stratification) on the propensity score
morie_matching_trim_propensity()
Trim propensity scores to a fixed range
morie_matching_variable_ratio()
Variable-ratio matching on propensity score
morie_matheron_estimator()
Matheron classical semivariogram estimator with its (4.25) variance
morie_matroid_bases()
The maximal independent sets
morie_matroid_circuits()
The minimal dependent sets
morie_matroid_dual()
The dual matroid
morie_matroid_rank()
Rank of a subset: the size of its largest independent subset
morie_matrxP()
Matrix profile of a time series
morie_matthews_corrcoef()
Matthews correlation coefficient from label vectors
morie_max_flow_min_cut()
Max-flow min-cut by Ford-Fulkerson with breadth-first augmentation
morie_maximum_score()
Manski maximum score and Horowitz's smoothed version
morie_mcc_counts()
Matthews correlation coefficient from confusion-matrix counts
morie_mcd_outlier()
MCD-based robust Mahalanobis outlier detection
morie_mcdrop()
Average the softmax over repeated stochastic forward passes (p. 410)
morie_mctsr()
Monte Carlo tree search with UCT and random rollouts
morie_mdlpost()
Two-part minimum-description-length message length (eq. 28.16-28.17, p. 352)
morie_mdpval()
Value iteration for a finite Markov decision process
morie_mean_cpp
morie_mean_cpp
morie_mectest()
Markov equivalence, ch. 5 p. 85 (Verma and Pearl, 1991)
morie_median_voter_ci()
Median voter with a standard error that does not assume normality
morie_mediation_difference()
Difference-in-coefficients mediation estimator
morie_mediation_product()
Product-of-coefficients mediation estimator
morie_mediation_sensitivity()
Mediation sensitivity to an unobserved confounder
morie_meta_convert()
Meta-analysis effect-size conversions
morie_meta_dl_bias()
Size of the DerSimonian-Laird truncation bias under homogeneity
morie_meta_effect_sizes()
Meta-analysis effect sizes: d, Hedges g, RR, OR, Fisher Z
morie_meta_hksj()
Hartung-Knapp-Sidik-Jonkman interval with DerSimonian-Laird or REML heterogeneity
morie_meta_pool()
Meta-analysis pooling: weights, mean effect, Q, I squared, tau squared
morie_meta_random_effects()
Fixed-effect and DerSimonian-Laird random-effects pooling, with what the truncation does
morie_meta_rma()
Random- / fixed-effects meta-analysis via metafor
morie_mfird()
MIRT a to factor-loading conversion (and inverse)
morie_midas_regression()
MIDAS regression with Beta-polynomial weights
morie_midegf()
Barnard-Rubin adjusted degrees of freedom for MI inference
morie_miefcl()
Pool a scalar estimate across multiply imputed data sets
morie_miest1()
Mutual information by k-nearest-neighbour statistics (KSG)
morie_mini_batch_gradient()
Mini-batch stochastic gradient descent for OLS (R parity)
morie_minimax_regret_constant()
The constant in the Hirano-Porter treatment-choice bound
morie_minimum_spanning_tree()
Kruskal's algorithm: greedy on the cycle matroid
morie_miord2()
MICE: multivariate imputation by chained equations (normal model)
morie_misclass_correct()
Correct a prevalence for identification error
morie_misclass_count()
Adjust an observed count for identification error
morie_misclassified_contrast()
Misclassification of an ordinal exposure can reverse a contrast
morie_misclassified_rd()
Nondifferential misclassification of a binary exposure
morie_one_way() morie_mme() morie_blue_blup_v() morie_em_lmm() morie_lmm_loglik() morie_reml_loglik()
Linear mixed-model estimation
morie_ml_apply_smote()
Apply SMOTE oversampling to balance a binary outcome
morie_ml_assess()
Assess model performance
morie_ml_bake()
Apply (or reverse) a prepped recipe to data
morie_ml_center()
Center a numeric vector to a target mean
morie_ml_eval_robustness()
Evaluate Random Forest robustness
morie_ml_impute()
Mean/median/constant imputation of a numeric vector
morie_ml_load()
Load a trained model from disk
morie_ml_model()
Specify a supervised model without fitting it
morie_ml_prep()
Estimate recipe parameters from training data
morie_ml_recipe()
Specify a preprocessing recipe
morie_ml_resample()
Train + assess across resampling folds and combine the results
morie_ml_save()
Save a trained model to disk
morie_ml_scale()
Scale a numeric vector by a target standard deviation
morie_ml_split()
Partition data into train / test / validation sets
morie_ml_train()
Train a specified model
morie_ml_train_time()
Estimate time to train a model
morie_ml_tune()
Tune hyperparameters by cross-validated grid search
morie_mlogit_probs()
Multinomial probabilities and conditional odds ratios
morie_mmd_test()
Kernel two-sample test using the maximum mean discrepancy
morie_mobius_inversion()
Mobius inversion over the divisor lattice
morie_model_assisted()
Model-assisted (GREG) estimators
morie_binary_metrics() morie_class_metrics() morie_mcc() morie_brier() morie_pca() morie_ridge()
Model evaluation metrics
morie_module_names()
Names of the CPADS analysis modules
morie_monotone_causal_forest()
Causal forest with an isotonic monotonicity constraint on the CATE
morie_moran_trend()
Moran's I under a deterministic trend, and on regression residuals
morie_morans_i() morie_morans_i_test()
Moran's I and its asymptotic test
morie_motiff()
Milo et al. (2002) network-motif significance
morie_moving_average()
Causal moving-average (boxcar) filter
morie_mrcv_glmm()
MRCV loglinear means and GLMM linear predictors
morie_mrm_dags()
Canonical MRM causal DAGs
morie_mrm_estimate_causal_effect()
Estimate a causal effect through the full MRM pipeline
morie_mrm_load_si_dataset()
Load a special-investigations sample with provenance metadata
morie_mrm_reconcile()
Reconcile two sources under an explicit matching schema
morie_mrm_report()
Render a publication-ready table from an MRM effect object
morie_msglen()
Message length and its probability, in bits (eq. 28.15, p. 352)
morie_mtdrl_TabularHistoryAgent-class morie_mtdrl_TabularHistoryAgent
A reference inner learner
morie_multi_horizon_ks()
Multi-horizon distributional accuracy test
morie_multi_trait_gblup()
Multi-trait GBLUP via vec-stacked mixed-model equations
morie_multicategory_logit()
Multicategory logit models
morie_multinomial_coef()
Multinomial coefficient with an implicit leftover committee
morie_multinomial_pmf()
Multinomial and contingency-table PMFs
morie_multiple_testing
Multiple testing correction and multiplicity-adjusted inference
morie_multitrait() morie_multitrait_ridge() morie_gxe_multitrait() morie_gxe_blup() morie_bmtme_conditionals()
Multi-trait and genotype-by-environment models
morie_mupostsg()
Posterior over the mean at known noise level (eq. 24.9-24.11, p. 320)
morie_mvn_with_covariance()
Draw multivariate normal samples under a structured covariance
morie_mvnorm_pmv()
Multivariate normal rectangle probability via mvtnorm
morie_mvnorm_sample()
Sample from the multivariate normal via mvtnorm
morie_mvrnorm()
Native multivariate normal sampling (reproduces MASS::mvrnorm)
morie_myopic_example()
The greedy allocation loses to the patient one when the discount is high
morie_nb_matches_zip()
A negative binomial with the zero share and mean of any zero-inflated Poisson
morie_nbeats_basis()
N-BEATS-style polynomial + Fourier basis-expansion forecasting
morie_neff_cluster()
Effective sample size under clustering
morie_nelson_aalen() morie_survival_nelsonaalen()
Nelson-Aalen cumulative hazard
morie_nesterov()
Nesterov accelerated gradient step
morie_netcms()
Gaussian graphical model by the graphical lasso
morie_neural_kantorovich_map()
Monotone 1-D transport map fitted to the quantile coupling
morie_ann_forward() morie_ann_gradients() morie_ann_train()
Feed-forward neural networks
morie_newey_west_vcov()
Newey-West HAC covariance
morie_nhitsnet()
N-HiTS multi-rate sampling with hierarchical interpolation
morie_nls() print(<morie_nls>) summary(<morie_nls>) print(<summary.morie_nls>) coef(<morie_nls>) vcov(<morie_nls>) fitted(<morie_nls>) residuals(<morie_nls>) deviance(<morie_nls>) df.residual(<morie_nls>) logLik(<morie_nls>) predict(<morie_nls>)
Nonlinear least squares from a model formula (native)
morie_nls_weight_function()
Efficient weight function for semiparametric weighted NLS
morie_nonbacktracking_matrix()
Non-backtracking (Hashimoto) matrix
morie_nonresponse_region()
The identification region of a proportion under nonresponse
morie_normal_pdf_cpp
morie_normal_pdf_cpp
morie_normal_scores()
Normal-scores transform
morie_np_kernel_reg()
Nonparametric kernel regression via np
morie_npiv_operator()
Sieve estimate of the NPIV operator
morie_npiv_quantile()
Nonparametric quantile IV
morie_nw_regression()
Nadaraya-Watson kernel regression
morie_nyc_nypd_socrata_cap_note
Socrata default-API-cap note + pagination wiring
morie_nypd_all_analyses()
Run the full New York Police Department analysis suite
morie_odds_ratio_check()
Check reported odds ratios against a labelled table, under every relabelling
morie_odds_ratio_ci()
Odds ratio and confidence interval from a 2x2 contingency table
morie_ols()
Ordinary least squares with inference
morie_ols_simple()
Simple OLS regression by the textbook equations
morie_ols_two_iv()
Two-predictor OLS slopes from correlations
morie_omega_squared()
Omega-squared (less biased than eta-squared)
morie_one_sample_coverage()
One-sample coverage probability (Gibbons Ch 2.11.1)
morie_one_sample_t_test()
One-sample t-test
morie_one_step_efficient()
One Newton step from any root-n start to asymptotic efficiency
morie_oneway_test()
Native one-way permutation test (Fisher-Pitman)
morie_optimal_alpha()
Theorem 5.2: the variance-minimising trimming threshold
morie_optimal_alpha_att()
Theorem 5.3: the one-sided threshold for the effect on the treated
morie_optimal_overlap_weight()
Variance-minimising overlap weight for a dual-frame estimator
morie_order_statistic_laws()
Order-statistic laws: median, coverage, binomial-beta identity
morie_ordered_alternatives_test()
Jonckheere-Terpstra ordered-alternatives test (Gibbons Ch 10.6)
morie_ordered_categories()
Linear-by-linear association test for ordered categories (Gibbons Ch 14.6.1)
morie_ordered_max_score()
Maximum-score estimator for an ordered-response model
morie_ordinal_logit_ca()
Ordinal (cumulative) logit utilities
morie_ospats()
Model-based prediction of design variances (Ospats family)
morie_otis_aipw_ate()
Doubly-robust (AIPW) ATE on OTIS data via cross-fitted nuisances
morie_otis_aipw_superlearner()
SuperLearner-stacked AIPW on OTIS data (native)
morie_otis_all_analyses()
Run the full OTIS analysis capsule
morie_otis_all_analyze
Comprehensive per-dataset analyses for ALL 28 OTIS public-release files
morie_otis_analyze_a01()
OTIS a01 high-level causal analysis (MatchIt + IRM-DML)
morie_otis_analyze_a01_ruhela_alt_age() morie_otis_analyze_a01_mrm_alt_age()
a01 alt-T Ruhela: Age 50+ -> vm count
morie_otis_analyze_a01_ruhela_alt_gender() morie_otis_analyze_a01_mrm_alt_gender()
a01 alt-T Ruhela: Female -> vm count
morie_otis_analyze_a01_ruhela_alt_toronto() morie_otis_analyze_a01_mrm_alt_toronto()
a01 alt-T Ruhela: Toronto region -> vm count
morie_otis_analyze_a01_ruhela_formulations() morie_otis_analyze_a01_dlrm() morie_otis_analyze_a01_mrm()
OTIS a01 Ruhela formulations (full DLRM)
morie_otis_analyze_a01_ruhela_per_year() morie_otis_analyze_a01_mrm_per_year()
Per-year full-DLRM on the a01 canonical formulation
morie_otis_analyze_a01_ruhela_subgroup_female() morie_otis_analyze_a01_mrm_subgroup_female()
a01 subgroup Ruhela: Female-only cell frame
morie_otis_analyze_a01_ruhela_subgroup_male() morie_otis_analyze_a01_mrm_subgroup_male()
a01 subgroup Ruhela: Male-only cell frame
morie_otis_analyze_a01_with_csi_context()
OTIS a01 causal pipeline + Toronto Crime Severity Index context
morie_otis_analyze_all()
Run every OTIS analyzer against a named list of datasets
morie_otis_analyze_b01()
Person-level segregation-placement analysis (b01)
morie_otis_analyze_b01_ruhela_alt_age() morie_otis_analyze_b01_mrm_alt_age()
b01 alt-T Ruhela: Age 50+ -> vm count
morie_otis_analyze_b01_ruhela_alt_gender() morie_otis_analyze_b01_mrm_alt_gender()
b01 alt-T Ruhela: Female -> vm count
morie_otis_analyze_b01_ruhela_alt_toronto() morie_otis_analyze_b01_mrm_alt_toronto()
b01 alt-T Ruhela: Toronto region -> vm count
morie_otis_analyze_b01_ruhela_formulations() morie_otis_analyze_b01_dlrm() morie_otis_analyze_b01_mrm()
OTIS b01 Ruhela formulations (full DLRM)
morie_otis_analyze_b01_ruhela_per_year() morie_otis_analyze_b01_mrm_per_year()
Per-year full-DLRM on the b01 canonical formulation
morie_otis_analyze_b01_ruhela_subgroup_female() morie_otis_analyze_b01_mrm_subgroup_female()
b01 subgroup Ruhela: Female-only cell frame
morie_otis_analyze_b01_ruhela_subgroup_male() morie_otis_analyze_b01_mrm_subgroup_male()
b01 subgroup Ruhela: Male-only cell frame
morie_otis_analyze_b02()
Aggregate segregation days per person per year (b02)
morie_otis_analyze_b02_ruhela_alt_age() morie_otis_analyze_b02_mrm_alt_age()
b02 alt-T Ruhela: Age 50+ -> seg-day count
morie_otis_analyze_b02_ruhela_alt_region() morie_otis_analyze_b02_mrm_alt_region()
b02 alt-T Ruhela: Toronto region -> seg-day count
morie_otis_analyze_b02_ruhela_formulations() morie_otis_analyze_b02_dlrm() morie_otis_analyze_b02_mrm()
OTIS b02 Ruhela formulations: T=Female -> seg-day count
morie_otis_analyze_b03()
Segregation placements by alert x institution (b03)
morie_otis_analyze_b03_ruhela_aggregate() morie_otis_analyze_b03_mrm_aggregate()
b03 aggregate Ruhela: Alert presence -> seg placements
morie_otis_analyze_b04()
Placement durations by region & gender (b04)
morie_otis_analyze_b04_ruhela_aggregate() morie_otis_analyze_b04_mrm_aggregate()
b04 aggregate Ruhela: Female -> median seg duration
morie_otis_analyze_b05()
Distribution of placements by binned duration (b05)
morie_otis_analyze_b05_mandela_classification()
Mandela-RF on b05 – per-placement Mandela classification by year
morie_otis_analyze_b05_ruhela_aggregate()
b05 aggregate Ruhela: schema-no-demographic guard
morie_otis_analyze_b06()
Reasons for placement x institution x gender (b06)
morie_otis_analyze_b06_ruhela_aggregate() morie_otis_analyze_b06_mrm_aggregate()
b06 aggregate Ruhela: Disciplinary reason -> seg placements
morie_otis_analyze_b07()
Alerts x gender (b07)
morie_otis_analyze_b07_ruhela_aggregate() morie_otis_analyze_b07_mrm_aggregate()
b07 aggregate Ruhela (pivot to long): With-alert -> seg placements
morie_otis_analyze_b08()
Durations by institution & gender (b08)
morie_otis_analyze_b08_ruhela_aggregate() morie_otis_analyze_b08_mrm_aggregate()
b08 aggregate Ruhela: Female -> median seg duration (institution-clustered)
morie_otis_analyze_b09()
Individuals by number of placements x gender (b09)
morie_otis_analyze_b09_ruhela_aggregate() morie_otis_analyze_b09_mrm_aggregate()
b09 aggregate Ruhela: Female -> individuals in segregation
morie_otis_analyze_c01()
Total individuals x custody/RC/seg x gender (c01)
morie_otis_analyze_c01_ruhela_aggregate() morie_otis_analyze_c01_mrm_aggregate()
c01 aggregate Ruhela: Female -> RC count
morie_otis_analyze_c01_ruhela_aggregate_region_cluster() morie_otis_analyze_c01_mrm_aggregate_region_cluster()
c01 region-cluster variant (year-clustered GEE)
morie_otis_analyze_c02()
Individuals in RC/seg by institution (c02)
morie_otis_analyze_c02_ruhela_aggregate() morie_otis_analyze_c02_mrm_aggregate()
c02 aggregate Ruhela: Female -> RC (institution GEE)
morie_otis_analyze_c03()
Individuals x race x gender (c03)
morie_otis_analyze_c03_ruhela_aggregate() morie_otis_analyze_c03_mrm_aggregate()
c03 aggregate Ruhela: Indigenous -> RC
morie_otis_analyze_c04()
Individuals in RC/seg by race x region (c04)
morie_otis_analyze_c04_ruhela_aggregate() morie_otis_analyze_c04_mrm_aggregate()
c04 aggregate Ruhela: Indigenous -> RC (by region)
morie_otis_analyze_c04_ruhela_aggregate_region_cluster() morie_otis_analyze_c04_mrm_aggregate_region_cluster()
c04 region-cluster variant
morie_otis_analyze_c05()
Individuals in RC/seg by religion x region (c05)
morie_otis_analyze_c05_ruhela_aggregate() morie_otis_analyze_c05_mrm_aggregate()
c05 aggregate Ruhela: non-majority religion -> RC
morie_otis_analyze_c06()
Individuals in RC/seg by age category x region (c06)
morie_otis_analyze_c06_ruhela_aggregate() morie_otis_analyze_c06_mrm_aggregate()
c06 aggregate Ruhela: Age 50+ -> RC
morie_otis_analyze_c07()
Individuals x alerts x gender (c07)
morie_otis_analyze_c07_ruhela_aggregate() morie_otis_analyze_c07_mrm_aggregate()
c07 aggregate Ruhela: Alert presence x Gender -> RC
morie_otis_analyze_c08()
Individuals by religion x gender (c08)
morie_otis_analyze_c08_ruhela_aggregate() morie_otis_analyze_c08_mrm_aggregate()
c08 aggregate Ruhela: non-majority religion x gender -> RC
morie_otis_analyze_c09()
Individuals by age category x gender (c09)
morie_otis_analyze_c09_ruhela_aggregate() morie_otis_analyze_c09_mrm_aggregate()
c09 aggregate Ruhela: Age 50+ x gender -> RC
morie_otis_analyze_c10()
RC/seg aggregate durations by institution (c10)
morie_otis_analyze_c10_ruhela_aggregate() morie_otis_analyze_c10_mrm_aggregate()
c10 aggregate Ruhela: Female -> median RC days (institution GEE)
morie_otis_analyze_c11()
Individuals by aggregate-duration bin (c11)
morie_otis_analyze_c11_mandela_classification()
Mandela-RF on c11 – per-individual Mandela classification by year
morie_otis_analyze_c11_ruhela_aggregate() morie_otis_analyze_c11_mrm_aggregate()
c11 aggregate Ruhela: long-duration bin (>=16 days) -> RC
morie_otis_analyze_c12()
RC/seg aggregate durations by region & gender (c12)
morie_otis_analyze_c12_ruhela_aggregate() morie_otis_analyze_c12_mrm_aggregate()
c12 aggregate Ruhela: Female -> median RC days (by region)
morie_otis_analyze_c_chi2()
MRM chi-square family on c-series
morie_otis_analyze_d01()
Person-level custodial deaths (d01)
morie_otis_analyze_d02()
Custodial deaths by gender (d02)
morie_otis_analyze_d02_ruhela_aggregate() morie_otis_analyze_d02_mrm_aggregate()
d02 aggregate Ruhela: Female -> custodial deaths
morie_otis_analyze_d03()
Custodial deaths by race (d03)
morie_otis_analyze_d03_ruhela_aggregate() morie_otis_analyze_d03_mrm_aggregate()
d03 aggregate Ruhela: Indigenous -> custodial deaths
morie_otis_analyze_d04()
Custodial deaths by religion (d04)
morie_otis_analyze_d04_ruhela_aggregate() morie_otis_analyze_d04_mrm_aggregate()
d04 aggregate Ruhela: non-majority religion -> custodial deaths
morie_otis_analyze_d05()
Custodial deaths by age category (d05)
morie_otis_analyze_d05_ruhela_aggregate() morie_otis_analyze_d05_mrm_aggregate()
d05 aggregate Ruhela: Age 50+ -> custodial deaths
morie_otis_analyze_d06()
Custodial deaths by alert x medical cause (d06)
morie_otis_analyze_d07()
Custodial deaths by alert x housing unit (d07)
morie_otis_analyze_d_chi2()
MRM chi-square family on d-series
morie_otis_analyze_otis_mandela_provincial_vs_federal()
Mandela-RF cross-comparison: Ontario provincial vs federal SIU
morie_otis_analyze_ruhela_grid()
Aggregate Ruhela grid: one-page IRR comparison across analyzers
morie_otis_analyze_ruhela_master()
Paper-ready master report – every Ruhela formulation in one result
morie_otis_analyze_ruhela_per_year()
Per-fiscal-year full-DLRM Ruhela formulation driver
morie_otis_analyzers()
Registry of dataset-id -> analyzer
morie_otis_astcmb()
Alert-state combination encoding (8 combos -> complexity index)
morie_otis_atc()
Doubly robust average treatment effect on the controls (ATC)
morie_otis_balance()
Covariate balance before and after weighting or matching
morie_otis_causal_grid()
Run IPW / AIPW / IRM-DML on the three canonical (T, Y) pairs
morie_otis_churn
Goffmanian institutional-churn analyses on OTIS
morie_otis_churn_analyze_all()
Run all 11 OTIS-churn analyses
morie_otis_classify_mandela_combo()
Mandela alert-state classifier for an OTIS placement row
morie_otis_disciplinary_medical_overlap()
Disciplinary x medical-protection overlap
morie_otis_embedding_distribution()
Total-days embedding distribution (lognormal vs Pareto vs exp)
morie_otis_figures()
Export the OTIS restrictive-confinement figures
morie_otis_gcomputation()
Parametric g-computation of the ATE on OTIS data
morie_otis_intra_year_transition_matrix()
Intra-year region-to-region transition matrix
morie_otis_ipw_ate()
Hajek-stabilised IPW estimator of the ATE on OTIS data
morie_otis_irm_dml()
Interactive Regression Model DML on OTIS data (ATE, ATTE, ATC)
morie_otis_irr_glmm_vm()
Poisson + Negative-Binomial IRR for volatility ~ alert complexity
morie_otis_load()
Load the canonical OTIS CSV
morie_otis_make_pair_a()
Pair (a): MentalHealth_Alert -> SuicideRisk_Alert (binary -> binary)
morie_otis_make_pair_alert_to_volatility_a01()
a01-aware wrapper for the Ruhela alert -> volatility builder
morie_otis_make_pair_alert_to_volatility_all()
Run both Ruhela and Naive alert -> volatility builders
morie_otis_make_pair_alert_to_volatility_naive()
Naive (max-simultaneous-flags + binary vm) alert -> volatility builder
morie_otis_make_pair_alert_to_volatility_ruhela()
Ruhela's primary alert-complexity -> regional-volatility builder
morie_otis_make_pair_b()
Pair (b): HighAlertComplexity -> AnyReadmission
morie_otis_make_pair_c()
Pair (c): RegionalVolatility -> SegregationDays
morie_otis_mortification_cooccurrence()
Mortification co-occurrence (concurrent alerts)
morie_otis_otdesc()
Full OTIS descriptive statistics suite
morie_otis_otdml()
Cross-fitted partially linear DML (ATE/ATT) on OTIS
morie_otis_path_complexity_gini()
Path complexity Gini by (year, region)
morie_otis_per_year_irm_dml()
IRM-DML (or the whole estimator battery) fitted separately by year
morie_otis_pipeline
OTIS analysis pipeline (RichResult-style driver)
morie_otis_plr()
Partially Linear Regression DML on OTIS data (native)
morie_otis_regional_placement() morie_otis_alert_state_combo() morie_otis_volatility() morie_otis_rc_trends() morie_otis_descriptives() morie_otis_dml()
Ontario Restrictive Confinement (OTIS) primitive analyses
morie_otis_psm()
Propensity-score 1:k NN matching with caliper on OTIS data (native)
morie_otis_psm_subclass()
Propensity-score subclassification ATE on OTIS data (native)
morie_otis_rctrnd()
Restrictive-confinement trends over time by region
morie_otis_regC_demog_contingency()
Multi-region path x Gender / Age contingency
morie_otis_region_alert_state_richness()
Region x alert state richness
morie_otis_repeat_placement_concentration()
Repeat-placement concentration (Goffmanian cyclical-inmate)
morie_otis_rplace()
Regional placement matrix by age group
morie_otis_tps_analyze_all()
Run all OTIS-TPS overlay analyses
morie_otis_tps_composite_overlay()
Composite overlay (alias for the YoY correlation)
morie_otis_tps_overlay
Cross-link OTIS (Ontario corrections) with TPS (Toronto police) data
morie_otis_tps_per_region_rollup()
OTIS seg/RC totals per region x year (Toronto row flagged for TPS-overlay use)
morie_otis_tps_yoy_correlation()
Year-over-year correlation between OTIS Toronto-region segregation placements and TPS incident counts (per category)
morie_otis_volat()
Regional volatility / placement movement
morie_otis_within_year_placement_count()
Within-year placement-count distribution
morie_otis_within_year_region_diversity()
Within-year region diversity
morie_outcome_test()
The outcome test: equal hit rates do not certify equal thresholds
morie_over()
Propensity-score overlap diagnostics
morie_oversample_factor()
Oversampling factor to reach a target subgroup composition
morie_owate_weights()
Theorem 5.4 / Corollary 5.2 OWATE weights
morie_p_ibs_given_ibd()
IBS-given-IBD probabilities for one SNP (PLINK Table 1)
morie_pacfts()
Partial autocorrelation by the Durbin-Levinson recursion (ch. 3)
morie_paired_t_test()
Paired t-test
morie_pan_tompkins_update()
Pan-Tompkins adaptive threshold update
morie_panel_cointegration()
Pedroni panel cointegration statistics
morie_panel_deconvolution()
Panel-data deconvolution of the individual and idiosyncratic densities
morie_panel_densities()
Both panel-deconvolution density estimators
morie_panel_max_score()
Maximum-score estimator for panel binary response
morie_parse_nypd_law_code()
Parse an NYPD law_code string into its structural fields
morie_partial_cor()
Partial correlation matrix (native)
morie_partial_cor_test()
Partial correlation test for one pair given controls (native)
morie_partial_permutations()
Partial permutations N_P_n
morie_partial_tau()
Kendall partial tau controlling for z
morie_partially_linear()
Robinson's partially linear model
morie_partition_count()
Integer partition counts by the pentagonal number theorem
morie_partitions_into_parts()
Partitions of n into exactly k positive parts
morie_partitions_of()
Every partition of an integer
morie_party_problem()
The party problem: R(3,3) = 6, proved rather than quoted
morie_party_unity()
Party unity score per legislator
morie_patchts()
PatchTST patching with reversible instance normalization
morie_paths()
Resolve standard project paths
morie_pca_dimension_reduction()
PCA via SVD for dimension reduction (R parity)
morie_pcg_filter()
Phonocardiogram (PCG) bandpass filter
morie_pcm()
Partial credit model category probabilities
morie_pelt()
Exact penalised changepoint detection (PELT)
morie_penalised_tmle()
Penalised doubly robust TMLE
morie_penalized_regression()
Elastic-net regression via coordinate descent (base R)
morie_percentage_bend_correlation() morie_winsorized_correlation()
Robust correlations
morie_percentile_modified_rank()
Percentile-modified rank (Gastwirth) two-sample test (Gibbons Ch 8.3.3)
morie_performance_check_collinearity()
Collinearity / VIF check via performance
morie_performance_check_model()
Regression-diagnostic plots via performance
morie_performance_check_outliers()
Outlier check via performance
morie_performance_r2()
R-squared family via performance
morie_permutation_attention_masks()
Two-stream attention masks induced by a factorization order
morie_permutation_lm_loss()
Permutation language-model loss under one factorization order
morie_permutation_valid()
Exactness of the permutation p-value over a finite design
morie_pgdsdg()
Projected gradient descent
morie_pick_theorem()
Pick's theorem, checked by counting rather than assumed
morie_pinball()
Pinball (quantile) loss (ch. 17 p. 494)
morie_placebo_dr_did()
Placebo doubly-robust difference-in-differences
morie_plncF()
Planck spectral radiance B(lambda, T)
morie_pmf_convolve()
pmf of the sum of two independent discrete variables
morie_pmf_moments()
Moments of a discrete pmf
morie_point_biserial_r()
Point-biserial correlation
morie_poisson_chernoff()
Chernoff tail bound for a Poisson count
morie_poisson_dist()
Poisson distribution surface
morie_poisson_loglinear()
Poisson regression and loglinear models
morie_polqnt()
PolarQuant polar-transformation quantization
morie_polr()
Native ordered logistic/probit regression (reproduces MASS::polr)
morie_polya_tree_density()
Polya tree posterior mean density
morie_polya_tree_mixture()
Mixture of Polya trees
morie_polya_tree_rate()
Adaptive Polya tree rate
morie_polynomial_regression()
Polynomial regression (R parity)
morie_portmanteau_hosking()
Hosking's multivariate portmanteau test for white noise
morie_poschk()
Positivity: every treatment value has positive probability in every covariate stratum (ch. 7 p. 157)
morie_post_lasso()
Refit by OLS on the lasso's selected support
morie_postgapx()
Quadratic approximation to a posterior (eq. 28.5, p. 344)
morie_postodds()
Posterior odds from a likelihood ratio and prior odds (eq. 3.21, p. 53)
morie_power_prop_test()
Power for a two-proportion z-test
morie_power_t_test()
Power for a two-sample t-test
morie_power_ttest_crim()
Statistical power for t-based tests (crim shelf)
morie_ppcor_partial()
Partial correlation via ppcor
morie_ppcor_semipartial()
Semi-partial correlation via ppcor
morie_pps_sample()
Probability proportional to size (PPS) sampling
morie_pps_variance()
pps with-replacement variance estimator of a total
morie_prediction_accuracy()
Genomic-prediction accuracy metrics
morie_predictive_recursion()
Newton's predictive recursion
morie_predpol_aggregate_areas()
Aggregate per-record predictive-policing data to one row per area
morie_predpol_calibration_audit()
Audit whether an algorithm's area risk ranking matches realised outcomes
morie_predpol_score_disparity()
Descriptive disparity in a risk score across groups
morie_predpol_temporal_audit()
Audit how disparity metrics move over time and across cities
morie_pretprep()
Preprocess an image for a pretrained model (pp. 458-459)
morie_privacy_amplification()
Privacy amplification by subsampling
morie_private_accuracy_tradeoff()
Privacy-accuracy trade-off
morie_private_ci()
An interval that accounts for the mechanism's own variance
morie_private_release()
Laplace mechanism release
morie_prob_rules()
Elementary probability rules for an event pair
morie_probability_of_necessity()
Probability of necessity: bounds for attributing an outcome to a sanction
morie_profile_dataset()
Profile a data.frame: per-column types, missingness, summary statistics
morie_prophet_components()
Prophet-style additive decomposition (linear trend + Fourier seasonality)
morie_proportion_ci()
Wilson score confidence interval for a proportion
morie_psdmt()
Multitaper power spectral density
morie_psm_balance()
Propensity-score matching standardized absolute bias
morie_psy_eap_theta()
Expected a posteriori ability estimate
morie_psy_icc1k()
ICC(1,k): one-way random, average of k ratings
morie_psy_icc2k()
ICC(2,k): two-way random, average measure
morie_psy_icc3k()
ICC(3,k): two-way mixed, average measure
morie_psy_ma_loo()
Leave-one-out influence for meta-analysis
morie_psy_ma_paule_mandel()
Paule-Mandel between-study variance
morie_psy_ma_reml()
REML between-study variance
morie_psy_ma_rve()
Robust variance estimation for dependent effect sizes
morie_psy_map_theta()
Maximum a posteriori ability estimate
morie_psy_mle_theta()
Maximum-likelihood ability estimate
morie_psy_theta_eap()
EAP theta over a response matrix – alias
morie_psy_theta_map()
MAP theta over a response matrix – alias
morie_psy_wle_theta()
Warm's weighted likelihood ability estimate
morie_psymet_alpha()
Cronbach's coefficient alpha with Feldt CI
morie_psymet_alphadel()
Alpha if item deleted
morie_psymet_ave()
Average variance extracted (AVE) from factor loadings. Mean(lambda^2)
morie_psymet_bartlett()
Bartlett's test of sphericity
morie_psymet_cr()
Composite reliability from standardized factor loadings. CR = (sum lambda)^2 / ((sum lambda)^2 + sum(1 - lambda^2))
morie_psymet_discrimination()
Item discrimination (D-statistic)
morie_psymet_itemtotal()
Corrected item-total correlations
morie_psymet_kmo()
Kaiser-Meyer-Olkin sampling adequacy
morie_psymet_omega()
McDonald's omega total and hierarchical
morie_psymet_parallel()
Horn's parallel analysis – suggested number of factors
morie_psymet_splithalf()
Spearman-Brown split-half reliability
morie_ptmcmc()
Parallel tempering (replica exchange)
morie_qlearn()
Tabular Q-learning
morie_qlrtst()
Quandt/Andrews sup-Wald structural-break test
morie_qmDS()
Empirical quantile mapping
morie_qte_firpo()
Quantile treatment effect via Firpo IPW
morie_quanrg()
Exact regression quantile (Koenker-Bassett)
morie_quantile_causal_forest()
Quantile-balanced causal forest for distributional treatment effects
morie_quantile_hadamard()
Quantile Hadamard sandwich inequality
morie_quantile_reg()
Quantile regression via quantreg
morie_quantreg()
Linear quantile regression (ch. 17 p. 500)
morie_r3post()
R3 repetition-code bit posterior (MacKay 2003 eq. 1.18, p. 9)
morie_rake()
Rake a weight vector to known population margins
morie_ramsey_lower_bound_probabilistic()
Erdos's probabilistic lower bound on the diagonal R(k, k)
morie_ramsey_number()
Ramsey number R(k, l), exactly or as an interval
morie_ramsey_upper_bound()
Upper bounds on R(k, l) from the classical arguments
morie_ramsey_witness()
Verify a Ramsey lower-bound witness
morie_random_forest_ensemble()
Random Forest ensemble (R parity)
morie_random_forest_genomic()
Random-forest genomic predictor
morie_random_search_cv()
Random search hyperparameter optimisation (R parity)
morie_random_walk_exposure()
Random-walk exposure on a graph is proportional to degree
morie_randomized_response_dp()
Warner randomized response
morie_randtests_bartels()
Bartels rank test via randtests
morie_randtests_runs()
Wald-Wolfowitz runs test via randtests
morie_randtests_turning_point()
Turning-point test via randtests
morie_rank_based_test()
Mann's rank test for randomness (Gibbons Ch 3.5)
morie_rank_exact_null()
Exact null distributions of Kendall's tau and Spearman's rho
morie_rank_index()
Semiparametric rank estimators of a single-index model
morie_rank_order_statistics()
Signed ranks of paired differences (Gibbons Ch 5.5)
morie_rank_persistence_null()
Rank-persistence null: the overlap of two top-k sets by chance
morie_rank_placements()
Rank placements of Y among X order statistics (Gibbons Ch 2.11.3)
morie_rank_tie_variance()
Tie-corrected null variances for the rank-sum family
morie_ranking_resolution()
Resolution of a ranking built from noisy risk scores
morie_ranova()
ANOVA (method-of-moments) estimation of variance components
morie_raoscot()
Rao-Scott first-order corrected goodness-of-fit chi-square
morie_rappor()
RAPPOR encode (Sec. 2, steps 1-4)
morie_rappor_decode()
RAPPOR decode (Sec. 4)
morie_rappor_epsilon()
RAPPOR privacy parameters (Theorems 1 and 2)
morie_rappor_star()
RAPPOR effective report probabilities (Lemma 1)
morie_rate_check()
Measure a convergence exponent
morie_ratio_estimator()
Ratio estimator with an auxiliary variable
morie_rational_gf_coefficients()
Power-series coefficients of a rational generating function
morie_rct_tests()
Randomized-experiment test statistics
morie_rd_mserd_bandwidth()
MSE-optimal RD bandwidths (rdrobust's mserd)
morie_rdd()
Sharp / fuzzy regression discontinuity with bundled diagnostics
morie_rdd_bandwidth_cct()
MSE-optimal RD bandwidth (Calonico, Cattaneo and Farrell 2020)
morie_rdd_bandwidth_ik()
Imbens-Kalyanaraman (IK) MSE-optimal bandwidth
morie_rdd_bandwidth_rot()
Rule-of-thumb (ROT) bandwidth – Silverman-style on running variable
morie_rdd_bandwidth_sensitivity()
Bandwidth sensitivity sweep
morie_rdd_bias_corrected()
CCT bias-corrected, robust-SE RDD inference
morie_rdd_cattaneo_density()
Cattaneo-Jansson-Ma (2020) local-polynomial density test
morie_rdd_covariate_balance()
Covariate balance at the cutoff
morie_rdd_density_test()
McCrary-style RD density test via rddensity
morie_rdd_discrete()
RDD with discrete running variable
morie_rdd_donut()
Donut-hole RDD
morie_rdd_fuzzy()
Fuzzy RDD treatment effect via instrumented Wald ratio
morie_rdd_geographic()
Geographic / boundary RDD on a signed distance
morie_rdd_kernel_triangular() morie_rdd_kernel_epanechnikov() morie_rdd_kernel_uniform() morie_rdd_kernel_gaussian()
RDD kernel functions
morie_rdd_kink()
Regression kink design – slope discontinuity at the cutoff
morie_rdd_local_polynomial()
Local polynomial regression at user-supplied evaluation points
morie_rdd_local_randinf()
Local-randomisation RDD inference via rdlocrand
morie_rdd_local_randomisation()
Local-randomisation RDD via permutation in a fixed window
morie_rdd_mccrary()
McCrary (2008) density manipulation test
morie_rdd_placebo_cutoff()
Placebo cutoff falsification test
morie_rdd_plot_data()
Binned scatter + global-polynomial data for an RD plot
morie_rdd_power()
RDD power calculation
morie_rdd_power_calc()
Power calculations for RDD designs via rdpower
morie_rdd_sample_size()
RDD sample-size determination
morie_rdd_sharp()
Sharp RDD treatment effect at the cutoff
morie_rdkfp()
RDKit path-based topological fingerprint
morie_rdp_compose()
Compose identical sampled Gaussians (Mironov 2017, Proposition 1)
morie_rdp_gaussian()
Gaussian RDP curve (Mironov 2017, Corollary 3)
morie_rdp_laplace()
Laplace RDP curve (Mironov 2017, Corollary 2)
morie_rdp_sampled_gaussian()
Exact RDP of the sampled Gaussian mechanism at an integer order
morie_rdpc()
Renyi-DP budget of the Gaussian mechanism
morie_rdpcomp()
RDP curve of composed sampled Gaussians, optionally converted to DP
morie_read_outputs_manifest()
Read outputs manifest from a project
morie_read_parquet()
Read a Parquet file
morie_recmulti()
Recursive multi-step forecasting (ch. 18 p. 546)
morie_recommended_pair_test()
Recommended bivariate test for a pair of variables
morie_recommended_summary()
Recommended summary statistic for a single variable
morie_reconcile_hierarchy()
Reconcile hierarchical forecasts so they add up
morie_recording_map()
Recorded counts from true counts through a recording matrix
morie_recording_regimes()
Two recording regimes from one recorded series
morie_regime_switching()
Markov-switching regression (Hamilton 1989)
morie_regime_value()
Value of a treatment regime (AIPW / IPW / regression)
morie_regression
Linear regression with inference, robust errors and diagnostics
morie_regression_estimator()
Regression (difference) estimator
morie_regression_to_mean()
Regression to the mean at selected hot spots
morie_regularization_path()
Ridge / LASSO / ElasticNet regularization path (R parity)
morie_relabel_forensics()
Name the mechanical step that reproduces a label permutation
morie_relative_risk_from_or()
Relative risk from an odds ratio: the interval that arrest-only data allow
morie_relmae()
Relative mean absolute error against a benchmark (ch. 19 p. 571)
morie_renyi_dp_composition()
Renyi differential privacy composition
morie_repcn()
Blocklength reaching a target error rate (eq. 1.44-1.45, p. 17)
morie_repcpb()
Block error probability of the RN repetition code (eq. 1.42-1.43, p. 17)
morie_reportm()
Report Noisy Max
morie_residual_edf()
Empirical distribution of regression residuals
morie_respwt()
Weighting-class adjustment for survey nonresponse
morie_ridge_estimator()
Ridge regression closed form, the grid-search default estimator (hmgrs)
morie_rif_quantile() morie_rif_gap()
Recentered influence function of a quantile, and the gap it carries
morie_ripley_csr_test()
CSR test via Monte Carlo envelopes on Ripley's K
morie_ripley_k()
Ripley's K function
morie_risk_difference_ci()
Risk difference (ARD) with Newcombe CI
morie_risk_ratio_ci()
Risk ratio (relative risk) with log-normal CI
morie_rkhs_full()
RKHS regression with Gaussian kernel
morie_rlearn()
Residualized (Robinson-style) CATE estimator
morie_rlm()
Native robust (Huber M-estimator) regression (reproduces MASS::rlm)
morie_rls_phi()
RLS correlation matrix and normal equations
morie_rminsamp()
Uniform draws needed to hit the typical set once (eq. 29.19, p. 366)
morie_rmsdtr()
Kabsch optimal-superposition RMSD
morie_rmse()
Root mean squared error (ch. 19 p. 566)
morie_rmsprop()
RMSProp optimiser step
morie_rmsse()
Root mean squared scaled error (ch. 19 p. 572)
morie_rmst()
Restricted mean survival time
morie_rmst_difference()
Difference in restricted mean survival time between two groups
morie_rnn_genomic()
Vanilla RNN genomic predictor (BPTT, base R)
morie_rob_huber()
Huber M-estimator regression
morie_rob_m()
General M-estimator regression
morie_rob_mm()
MM-estimator regression
morie_rob_mm_alias()
MM-estimator regression – alias entry point
morie_rob_qn()
Qn robust scale estimator
morie_rob_s()
S-estimator regression
morie_rob_sens_slope()
Sen's slope for a time series
morie_rob_sn()
Sn robust scale estimator
morie_rob_tau()
Tau-estimator regression
morie_rob_theil_sen()
Theil-Sen slope estimator
morie_robust_anova
Robust one-way designs
morie_robust_association
Robust correlation, effect size and regression
morie_robust_location
Robust measures of location
morie_robust_quantiles
Robust quantiles and spread
morie_robust_tests
Robust tests for one and two groups
morie_robust_vcov() morie_robust_se()
Heteroskedasticity-consistent covariance (White's sandwich)
morie_roc_auc_score()
ROC curve and AUC (R parity)
morie_rollfeat()
Rolling-window features (ch. 6 p. 176)
morie_rosenb()
Rosenbaum sensitivity bounds over a Gamma grid
morie_rpgad()
Convert an RDP curve to (epsilon, delta)-differential privacy
morie_rq() print(<morie_rq>) summary(<morie_rq>) print(<summary.morie_rq>) coef(<morie_rq>) vcov(<morie_rq>) fitted(<morie_rq>) residuals(<morie_rq>) predict(<morie_rq>) logLik(<morie_rq>)
Quantile regression (Frisch-Newton interior point, native)
morie_rsample_bootstraps()
Native set of bootstrap resamples (rsample-style)
morie_rsk_correspondence()
The Robinson-Schensted correspondence
morie_rsk_insert()
Row-insert one value into a tableau, bumping
morie_rsk_inverse()
Recover the permutation from its two tableaux
morie_rtwall()
Wallinga-Teunis case reproduction numbers
morie_ruin_probability()
Absorption probability of a finite-capacity allocation
morie_run_ebac_selection_ipw_analysis()
Run the eBAC selection-adjusted IPW workflow
morie_run_length_bound()
Mean run length of a restarted detector with false-alarm probability alpha
morie_run_morie_module()
Run one implemented MORIE module against CPADS data
morie_run_morie_modules()
Run multiple implemented MORIE modules
morie_run_pipeline()
Run multiple workflow steps
morie_run_propensity_ipw_analysis()
Run the CPADS propensity/IPW workflow
morie_run_treatment_effects_analysis()
Run an extended treatment-effects analysis (ATE / ATT / ATC + CATE)
morie_run_weighted_logistic_analysis()
Run a weighted logistic-regression analysis
morie_run_workflow_step()
Run one project workflow step
morie_runs_pmf()
Null distributions of the two-sample runs counts
morie_runs_test()
Wald-Wolfowitz runs test (native)
morie_runs_updown()
Exact null distribution of runs up and down
morie_sacc()
Soft policy iteration (tabular soft actor-critic core)
morie_safe_factor()
Build a factor with explicit, verified levels
morie_safe_recode()
Recode a categorical column by explicit name-to-name mapping
morie_safe_relabel()
Relabel a categorical variable by name, never by position
morie_sample()
Load a included MORIE reference sample by name
morie_sample_acf()
Sample autocorrelation function
morie_sample_pacf()
Sample partial autocorrelation function
morie_sample_size()
Required sample sizes and Bayesian criteria
morie_sample_size_domain()
Sample size for a subpopulation (domain) within a larger frame
morie_sample_size_logistic()
Sample size for logistic regression (Hsieh, Bloch and Larsen 1998)
morie_sample_size_proportion()
Sample size for a proportion under a complex design
morie_sar_lag()
Spatial lag (SAR) model reduced form
morie_sarsa()
Tabular SARSA
morie_saxR()
SAX word for a series
morie_sax_breakpoints()
Equiprobable Gaussian breakpoints for SAX
morie_sax_mindist()
MINDIST between two SAX words
morie_scaled_schoenfeld()
Scaled Schoenfeld residuals and the Grambsch-Therneau PH test
morie_screen_design()
Two-phase screening design for a rare subpopulation
morie_sctsne()
t-SNE embedding (Algorithm 1 of van der Maaten & Hinton 2008)
morie_sd_forms()
Standard deviations of sums and means
morie_seasnaive()
Seasonal naive baseline (ch. 8 p. 219)
morie_second_moment_threshold()
The second moment method
morie_selective_labels()
Selective labels: what a release rule's failure rate can be known from released cases
morie_selective_labels_judges()
Selective labels across judges ordered by leniency
morie_semipar_bridge
Semiparametric kernel primitives (R port)
morie_semipar_efficiency()
Semiparametric efficiency
morie_semipartial_cor()
Semi-partial (part) correlation matrix (native)
morie_sensitivity_amplification()
Amplification of a sensitivity parameter: one Gamma is a curve of (Lambda, Delta)
morie_sensitivity_evalue()
E-values for the EValue dispatch family (extender)
morie_sensitivity_konfound()
Konfound robustness for a coefficient (native konfound)
morie_sensitivity_omitted_var_bias()
Omitted-variable bias on a fitted model (native sensemakr)
morie_sensitivity_rosenbaum()
Rosenbaum bounds sensitivity analysis
morie_sensitivity_tipping_point()
Tipping point for a single unmeasured confounder (native tipr)
morie_sentence_effect_bounds()
Worst-case identification bounds for a binary outcome under two sentences
morie_sentence_effect_mtr()
Monotone-treatment-response bounds for a binary outcome under two sentences
morie_sentence_effect_mts()
Monotone-treatment-selection bounds for a sentencing contrast
morie_sepset()
Smallest set that d-separates x from y, searched in a fixed order
morie_serial_mediation()
Serial (chain) mediation X -> M1 -> M2 -> Y
morie_series_regression()
Series (sieve) regression
morie_seriesdecomp()
Autoformer series decomposition block, eq. (1)
morie_sexbeta()
Dynamic-equilibrium fitness-variance factor (eq. 19.7, p. 271)
morie_sexdfdt()
Mean-fitness growth rate under recombination (eq. 19.13, p. 273)
morie_sexfsol()
Closed-form fitness trajectory under recombination (eq. 19.14, p. 273)
morie_sgd_momentum()
SGD with heavy-ball momentum
morie_sgd_update()
Stochastic-gradient update on a mini-batch
morie_sgolay_smooth()
Savitzky-Golay smoothing filter
morie_sgt_closeness_centrality()
Closeness centrality (Wasserman & Faust Ch 5.3.2, sgtclo)
morie_sha1()
Hash R objects with numeric rounding (digest's sha1 generic, natively)
morie_shapiro_wilk_test()
Shapiro-Wilk normality test
morie_shrinkage_factor_error()
Error of the empirical-Bayes shrinkage factor when the total mass is estimated
morie_shrinkage_loss()
Loss of the shrinkage estimator against a known truth
morie_shrunk_targeting_unsafe()
The thing not to do: penalise the fluctuation
morie_si_estimators()
Simple random sampling estimators for proportions and infinite totals
morie_sibtest()
SIBTEST for differential item functioning
morie_sieve_basis()
Sieve basis
morie_sieve_iv()
Sieve (series) solution of the nonparametric IV equation
morie_sigevid()
Log evidence for the noise level (eq. 24.13, p. 320)
morie_sign_test_power()
Power function of the two-sided sign test (Gibbons Ch 5.4.4)
morie_simple_random_sample()
Simple random sample from a data frame
morie_simpleboot_two()
Direct bridge to simpleboot::two.boot
morie_simplicial_complex_faces()
Close maximal simplices under taking faces
morie_simulate_longitudinal_panel()
Simulate a longitudinal panel and return a tidy long-format data.frame
morie_singleton_bound()
The Singleton bound
morie_singularity_transfer()
The basic transfer theorem
morie_siu_all_analyses()
Run every SIU descriptive analysis in this module
morie_siu_analyze
SIU descriptive analyses (R port of morie.siu.analyze)
morie_siu_anomaly_check()
Per-field anomaly check: does the parser's extraction match the HTML?
morie_siu_audit_case()
Audit one SIU case end-to-end: parser output + raw HTML
morie_siu_audit_columns()
Per-column accuracy audit: estimate every SIU column's correctness
morie_siu_audit_panel()
Mixture-of-Agents audit panel for one SIU report (native, any model)
morie_siu_by_police_service()
SIU cases by police service
morie_siu_by_year()
SIU cases by year
morie_siu_cache_path()
Cache-path helper for the lightweight SIU scraper
morie_siu_case_counts()
SIU per-case team-size distribution
morie_siu_charges_by_year_chi2()
Chi-square: charges-recommended independent of year?
morie_siu_classify_mandela()
Apply the Sprott-Doob Mandela-Rules classifier to one SIU stay
morie_siu_cli()
SIU command-line front end inside R
morie_siu_compare()
Field-by-field SIU comparison against a user-supplied external table
morie_siu_decision_timing()
SIU decision-timing distributions
morie_siu_demographics()
Affected-person demographics
morie_siu_index_url()
Lightweight Ontario SIU Director's Reports scraper (R-native)
morie_siu_fetch_cases()
Scrape Ontario SIU Director's Reports into a tidy CSV
morie_siu_fetch_dataframe()
Scrape Ontario SIU Director's Reports and return a data frame
morie_siu_index()
SIU drid ? case_number ? language index
morie_siu_llm_extract()
Extract SIU report fields with an LLM (Gemini or Claude)
morie_siu_mental_health_race_indicators()
Mental-health / race keyword indicators
morie_siu_panel()
Run the Mixture-of-Agents reading panel on SIU reports
morie_siu_parse_html()
Parse a SIU director's-report HTML page (pure-R)
morie_siu_parse_news_html()
Parse a SIU news-release HTML page (pure-R)
morie_siu_parse_report() morie_siu_parse_reports()
Parse one SIU director's report into the full 16-field schema
morie_siu_parser
Pure-R SIU director's-report parser (port of morie.siu._parser)
morie_siu_record_correction()
Record a verified correction to the SIU parser's output
morie_siu_refresh_manifest()
Rebuild the Ontario SIU DRID manifest by probing the live site
morie_siu_reports()
SIU director's-reports corpus: reviewed data first, fetch only what's new
morie_siu_resolve_so()
Resolve a subject-official count: verified corpus first, rules second
morie_siu_sanity_check()
Row-level sanity check on a parsed SIU table (regex-only, no LLM)
morie_siu_schema() morie_siu_html_to_text() morie_siu_to_iso_date() morie_siu_strip_boilerplate() morie_siu_report_url() morie_siu_fetch_report()
SIU schema, text, dates and report fetch (bricklayer or native core)
morie_siu_sprott_doob_feb2021()
Comprehensive replication of Sprott & Doob (Feb 2021)
morie_siu_sprott_doob_iftene_table1()
Sprott-Doob-Iftene (May 2021) Table 1: IEDM-reviewed population
morie_siu_sprott_doob_iftene_table10()
Sprott-Doob-Iftene (May 2021) Table 10: per-IEDM decision variance
morie_siu_sprott_doob_iftene_table15()
Sprott-Doob-Iftene (May 2021) Table 15: long-stay no-IEDM cases
morie_siu_sprott_doob_iftene_table9()
Sprott-Doob-Iftene (May 2021) Table 9: IEDM review outcomes
morie_siu_sprott_doob_table11()
Sprott-Doob (Feb 2021) Table 11: Region x stay length
morie_siu_sprott_doob_table12()
Sprott-Doob (Feb 2021) Table 12: regional over-/under-representation
morie_siu_sprott_doob_table13()
Sprott-Doob (Feb 2021) Table 13: regional SIU person-stay rates
morie_siu_sprott_doob_table15()
Sprott-Doob (Feb 2021) Table 15: Region x MH-flag
morie_siu_sprott_doob_table19()
Sprott-Doob (Feb 2021) Table 19: Mandela-Rules classification
morie_siu_sprott_doob_table22()
Sprott-Doob (Feb 2021) Table 22: Region x Mandela groups
morie_siu_sprott_doob_table23()
Sprott-Doob (Feb 2021) Table 23: regional torture/solitary rates
morie_siu_sprott_doob_table4()
Sprott-Doob (Feb 2021) Table 4: length-of-stay distribution
morie_siu_translate() morie_siu_translate_fr_to_en()
Translate SIU report text into any target language via local LLM
morie_siu_verify_chi2()
Recompute Pearson chi-square from a 2D contingency table
morie_siu_verify_published_chi_squares()
Verify every published chi-square against its transcribed cells
morie_siuiap_cite()
Build a citation string for an SIU IAP / CRIMSL / affidavit entry
morie_siuiap_panel_summary()
Human-readable summary of the SIU IAP panel
morie_slice()
Univariate slice sampler
morie_slidecv()
Sliding-window cross-validation (ch. 5 p. 128)
morie_smape()
Symmetric mean absolute percentage error (ch. 19 p. 569)
morie_smoothed_fU()
Smoothed deconvolution estimator of f_U
morie_sms_rate()
Rate of convergence of the smoothed maximum-score estimator
morie_snht()
Standard normal homogeneity test (Alexandersson 1986)
morie_sobel_test()
Sobel test for an indirect (mediated) effect
morie_spatial()
Construct a spatial data object
morie_spatial_2sls()
Spatial two-stage least squares
morie_spatial_classical_mds_cpp
morie_spatial_classical_mds_cpp
morie_spatial_cluster()
Spatial clustering of the coordinates
morie_spatial_coords()
Coordinate matrix of a spatial object
morie_spatial_crs()
CRS of a spatial object (EPSG + WKT2-style label)
morie_spatial_distance()
Distance matrix for a spatial object
morie_spatial_econometrics
Spatial autocorrelation and spatial-econometric estimators
morie_spatial_emirt_theta_update_cpp
morie_spatial_emirt_theta_update_cpp
morie_spatial_krige()
Ordinary kriging predictions at new locations
morie_spatial_lag_model() morie_spatial_error_model()
Maximum-likelihood spatial regression models
morie_spatial_leaflet_spec()
Specification for an interactive (leaflet) map
morie_spatial_models
Maximum-likelihood spatial models, point patterns and local privacy
morie_spatial_moran()
Global Moran's I on a spatial object
morie_spatial_neighbors()
Construct spatial neighbours
morie_spatial_nominate_iterate_cpp
morie_spatial_nominate_iterate_cpp
morie_spatial_omission()
Spatial-lag omission is bias, spatial-error omission is inefficiency
morie_spatial_sample()
Sample points from a spatial object, optionally by local density
morie_spatial_smacof_step_cpp
morie_spatial_smacof_step_cpp
morie_spatial_transform()
Reproject a spatial object between CRS (4326 <-> 3857)
morie_spatial_variogram()
Empirical semivariogram
morie_spatial_variogram_fit()
Fit a variogram model by Gaussian maximum likelihood
morie_spatial_voting_aldrich_mckelvey()
Aldrich-McKelvey scaling
morie_spatial_voting_alpha_nominate()
Alpha-NOMINATE ideal points (Carroll et al. 2013)
morie_spatial_voting_anchoring_vignettes()
Anchoring vignettes for DIF correction
morie_spatial_voting_bayesian_am()
Bayesian Aldrich-McKelvey scaling (Hare et al. 2015)
morie_spatial_voting_bayesian_irt_likelihood()
Bayesian IRT likelihood (deterministic part of CJR machinery)
morie_spatial_voting_bayesian_irt_posterior()
Posterior summaries for a Bayesian IRT chain
morie_spatial_voting_bayesian_mds()
Bayesian metric multidimensional scaling (Bakker and Poole 2013)
morie_spatial_voting_bayesian_unfolding()
Bayesian unfolding (Bakker and Poole 2013)
morie_spatial_voting_blackbox()
Blackbox / Basic Space scaling
morie_spatial_voting_cjr_irt()
Clinton-Jackman-Rivers Bayesian IRT by Gibbs sampling
morie_spatial_voting_classical_mds()
Classical (metric) multidimensional scaling
morie_spatial_voting_cutting_lines()
Cutting-line endpoints for Coombs-mesh plots
morie_spatial_voting_double_centering()
Double-center a distance matrix
morie_spatial_voting_dw_nominate()
DW-NOMINATE dynamic weighted ideal-point estimator
morie_spatial_voting_dynamic_irt()
Dynamic IRT: ideal points that drift by a random walk (Martin and Quinn 2002)
morie_spatial_voting_em_irt()
EM algorithm for binary IRT
morie_spatial_voting_ideal_point_recovery()
Ideal-point recovery from unfolding output
morie_spatial_voting_indscal()
INDSCAL: weighted MDS with individual differences
morie_spatial_voting_mds_fit_stats()
MDS fit statistics (Mardia criterion)
morie_spatial_voting_mlsmu6()
MLSMU6 alternating least-squares unfolding
morie_spatial_voting_nominate_bootstrap()
Parametric bootstrap of NOMINATE standard errors
morie_spatial_voting_nominate_loglik()
NOMINATE log-likelihood and GMP
morie_spatial_voting_nominate_utility()
NOMINATE Gaussian utility
morie_spatial_voting_nominate_vote_prob()
Single NOMINATE vote probability
morie_spatial_voting_nonmetric_mds()
Nonmetric MDS with isotonic regression
morie_spatial_voting_nonparametric_bootstrap()
Nonparametric bootstrap for AM / blackbox scaling positions
morie_spatial_voting_normal_vectors()
Normal-vector projection of an external measure
morie_spatial_voting_optimal_classification()
Optimal Classification scaling
morie_spatial_voting_ordered_oc()
Ordered Optimal Classification for ordinal scales
morie_spatial_voting_ordinal_irt()
Ordinal IRT: the ordinal factor model of Quinn (2004)
morie_spatial_voting_procrustes()
Procrustes rotation
morie_spatial_voting_smacof()
SMACOF stress minimisation
morie_spatial_voting_smacof_unfolding()
SMACOF rectangular unfolding
morie_spatial_voting_unfolding_stress()
Compute unfolding stress
morie_spatial_voting_wordfish()
Wordfish: Poisson IRT for document-term matrices
morie_spatial_weights()
Spatial weights from a neighbour matrix
morie_spatial_wordfish_omega_update_cpp
morie_spatial_wordfish_omega_update_cpp
morie_spearman_rho()
Spearman rank correlation
morie_specs_from_df()
Build a list of column specs from a parsed CSV header
morie_spectral_bandwidth()
Spectral bandwidth by two criteria
morie_spectral_cluster()
Spectral clustering via kernlab
morie_spectral_density()
Welch power spectral density
morie_sperner_lemma_triangle()
Sperner's lemma on the standard subdivided triangle
morie_sperner_width()
Sperner's theorem: the largest antichain in the subset lattice
morie_spillover_effects()
Direct, spillover and net effects under a stated exposure mapping
morie_spillover_exposure()
Three-level exposure from a treatment on a place network
morie_spillover_exposure_probs()
Exposure probabilities of a completely randomised deployment
morie_spillover_ht()
Horvitz-Thompson totals and contrasts under a randomised deployment
morie_spillover_ht_variance()
Design variance of the Horvitz-Thompson total (population formula)
morie_spillover_ring_bound()
Ring mis-specification bound for the spillover estimand
morie_spline_logit()
Cubic splines: piecewise, truncated power, basis and odds-ratio forms
morie_sprott_doob
Sprott & Doob (CRIMSL UToronto) SIU analyses
morie_standard_tableaux_count()
The hook length formula
morie_stars_bars()
Stars and bars count
morie_stat_bridge
Bridge between external runners and the morie R command registry
morie_stat_commands
Central command registry for the morie R surface
morie_state_space_model()
Local-level state-space model (Kalman filter+smoother)
morie_std_coef()
Standardized coefficients for OLS and logistic models
morie_steiner_triple_system()
Steiner triple systems, with the Bose construction verified
morie_stirling_first()
Unsigned Stirling numbers of the first kind
morie_stirling_second()
Stirling numbers of the second kind
morie_stirling_series_error()
Stirling's series with its error bound checked
morie_stlAn()
STL decomposition with MAD outlier flags
morie_stl_decompose()
STL seasonal-trend decomposition by loess
morie_stldecomp()
Seasonal-trend decomposition (ch. 3 p. 64)
morie_stratified_proportion()
Stratified estimator of a proportion
morie_stratified_sample()
Proportional or fixed stratified random sample
morie_stratsplt()
Stratified test split by proportional allocation (pp. 60-61)
morie_stsi_estimators()
Stratified simple random sampling estimators
morie_subcompositional_incoherence()
Spurious correlation of compositional parts, and its cure
morie_sucrule()
Rule of succession (eq. 3.16, p. 52)
morie_suggest_analysis_plan()
Suggest an analysis plan from a dataset profile
morie_sukhatme_test()
Sukhatme two-sample scale test (Gibbons Ch 9.7)
morie_sum_density()
Density of the sum of two independent variables on grids
morie_summarize_output_audit()
Summarize an output audit
morie_survey_calibrate()
Raking calibration to known marginal totals (iterative proportional fitting)
morie_survey_categorical()
Survey-weighted categorical estimates
morie_survey_complex_glm()
Complex-survey GLM in one call
morie_survey_design()
Construct a survey design object
morie_survey_glm()
Survey-weighted GLM with design-based SEs
morie_survey_hajek_mean()
Hajek (ratio) estimator of a population mean
morie_survey_ht_total()
Horvitz-Thompson estimator of a population total
morie_survey_mean()
Survey-weighted mean with its design-based standard error
morie_survey_poststratify()
Post-stratification weights (sample-to-population alignment)
morie_survey_ratio()
Ratio estimator of a population total using known X_pop
morie_survey_subpop()
Subpopulation (domain) mean with Woodruff linearised SE
morie_survey_variances()
Design-based vs model-based variance identities (chapter 26)
morie_survival
Survival analysis: Kaplan-Meier, Nelson-Aalen, log-rank and Cox
morie_survival_psi()
Kaplan-Meier Z-estimator map
morie_survvae_PRIMITIVES
Accepted primitives for the DSM experts
morie_sutvachk()
SUTVA: no interference between units, one version of treatment
morie_svc_train_cpp
Binary C-SVC via SMO (compiled)
morie_svm_fit_dual() morie_svm_dual_objective() morie_svm_beta() morie_svm_intercept() morie_svm_decision() morie_svm_label_matrix()
Support vector machines
morie_svm_decision_cpp
Decision values for new data given fitted SVM coefficients (compiled)
morie_svm_genomic()
Support-vector regression for genomic prediction
morie_svm_hinge_primal()
Linear SVM (primal hinge loss) – R parity
morie_svm_kernel_trick()
Kernel SVM (RBF / poly / sigmoid) – R parity
morie_svr_train_cpp
eps-SVR via SMO (compiled)
morie_sync_rng()
Synchronised RNG seeded reproducibly for cross-language workflows
morie_synth_control()
Native synthetic control (Abadie-Diamond-Hainmueller)
morie_synth_corrections_uof()
Build a synthetic Corrections-UoF data.frame for testing
morie_synth_otis()
Build a synthetic OTIS data.frame for a given publication id
morie_synth_otis_all()
Build the full 29-dataset OTIS synthetic list
morie_t_quantile()
Student-t quantile by bisection on the incomplete beta
morie_table_inertia()
Chi-square and total inertia of a two-way table
morie_tail_ratio()
Tail ratios that separate light from power-law count tails
morie_taphonomy_bhm()
Bayesian hierarchical preservation model
morie_taphonomy_clr()
Centred log-ratio (CLR) transform of compositional data
morie_taphonomy_decay_absorption()
Absorption analysis of a taphonomic decay chain
morie_taphonomy_decay_chain()
Build a taphonomic decay Markov chain (DTMC)
morie_taphonomy_decay_delta()
Natural-vs-treated fate delta for a taphonomic decay chain
morie_taphonomy_decay_simulate()
Simulate one decay path through a taphonomic Markov chain
morie_taphonomy_evidence_loglik()
Gaussian log-likelihood of forensic evidence under a model
morie_taphonomy_fetch_usgs_soil()
Fetch USGS National Geochemical Database soil geochemistry
morie_taphonomy_ilr()
Isometric log-ratio (ILR) transform of compositional data
morie_taphonomy_likelihood_ratio()
Forensic likelihood ratio for two competing hypotheses
morie_taphonomy_morphosource_fetch()
Download a MorphoSource media capsule
morie_taphonomy_morphosource_search()
Search MorphoSource for 3D media or physical objects
morie_taphonomy_pmi_schema()
STO-2022 taphonomic-observation schema (PMI nuisance variables)
morie_taphonomy_preservation_delta()
Estimate the natural preservation "delta" and its E-value
morie_taphonomy_preservation_lr()
Preservation likelihood ratio from measured evidence
morie_taphonomy_schema()
Taphonomy data schema (zero-row template)
morie_taphonomy_simulate_pxrf()
Simulate synthetic pXRF compositional data (Dirichlet)
morie_tarone_ware()
Tarone-Ware and the weighted log-rank family
morie_tau_to_theta()
Invert the Kendall's tau relation for a copula parameter
morie_taulep()
Explicit tau-leaping simulation (Gillespie 2001)
morie_tcc()
Test characteristic curve
morie_tcls()
t-closeness of a release, per equivalence class and overall
morie_terry_hoeffding_test()
Terry-Hoeffding (Fisher-Yates) two-sample normal-scores test (Gibbons Ch 8.3.1)
morie_test_information()
Test information function
morie_text_ate()
Treatment effect adjusting for what the text reveals
morie_tfidf()
Term frequency-inverse document frequency, computed natively
morie_tftnet()
Temporal Fusion Transformer gating and variable selection
morie_tgarch_model()
GJR-GARCH(1,1) threshold GARCH
morie_theta_method()
Theta method
morie_thinning_identification()
Thinning a Poisson count: the recording rate is not identified
morie_threshold_autoregression()
Two-regime self-exciting threshold autoregressive (SETAR) model
morie_tide()
TiDE dense encoder-decoder
morie_tightness_check()
Asymptotic tightness / equicontinuity check
morie_tikhonov_iv()
Tikhonov regularisation for nonparametric IV
morie_timeseries_robust
Unit-root testing and robust regression
morie_tmldgp_cheatsheet()
Compact one-line summary of the tmldgp recipe
morie_tmldta_cheatsheet()
Compact one-line summary of the tmldta recipe
morie_tmldyk_cheatsheet()
Compact one-line summary of the tmldyk recipe
morie_tmldyn_cheatsheet()
Compact one-line summary of the tmldyn recipe
morie_tmle_ate()
Targeted maximum likelihood estimate of the average treatment effect
morie_tmle_data_adaptive()
Contrast between data-discovered exposure levels, done honestly
morie_tmle_diff_kernel()
Differentially private TMLE of the ATE
morie_tmle_dynamic_regime()
Mean outcome under the (V-)optimal dynamic treatment rule
morie_tmle_late()
TMLE for the instrumental-variable LATE
morie_tmle_longitudinal()
Longitudinal TMLE: always-treat minus never-treat
morie_tmle_mediation()
TMLE for natural direct and indirect mediation effects
morie_tmle_propensity_only()
Propensity-only TMLE: double robustness by construction
morie_tmle_quantile()
TMLE for quantile treatment effects
morie_tmle_rmst()
TMLE for the difference in restricted mean survival time
morie_tmle_sensitivity()
TMLE bounds under the marginal sensitivity model
morie_tmle_time_varying()
Sequentially targeted g-computation under time-varying confounding
morie_tmle_truncation_sweep()
TMLE across a grid of propensity truncation levels
morie_tmlefp_cheatsheet()
Compact one-line summary of the tmlefp recipe
morie_to_hood_crosswalk()
Load the included BIDIRECTIONAL 158 <-> 140 neighbourhood crosswalk
morie_to_neighbourhoods()
Load a Toronto neighbourhood polygon layer
morie_tokenizer_decode()
Decode token IDs back to text
morie_tokenizer_encode()
Encode text to a vector of token IDs
morie_tokenizer_new()
Construct a MORIE tokenizer
morie_tokenizer_vocab_size()
Vocabulary size
morie_tolerance_beta()
Distribution-free tolerance coefficient for (X(r), X(s))
morie_tolerance_limits()
Distribution-free (Wilks) tolerance limits
morie_topological_torsions()
Every topological torsion in a molecule, with multiplicities
morie_toptor_cheatsheet()
Compact one-line summary of the toptor recipe
morie_toronto_neighbourhoods
Toronto neighbourhood boundary versions
morie_torsion_similarity()
The paper's similarity score S = 2 D / (d_i + d_j)
morie_tox_antemortem_lr()
Likelihood ratio for antemortem ingestion versus postmortem artefact
morie_tox_calibration()
Fit an internal-standard calibration curve and inverse-predict an unknown
morie_tox_ethanol_congeners()
Adjudicate ethanol as antemortem ingestion versus postmortem production
morie_tox_left_censor_impute()
Impute left-censored (below-LOD) toxicology values
morie_tox_matrix_reliability()
Rank specimen matrices by reliability under submersion and decomposition
morie_tox_matrix_schema()
Typed zero-row schema for a forensic-toxicology sample table
morie_tox_pmr_ratio()
Flag postmortem redistribution from a central:peripheral concentration ratio
morie_tps_add_hood_140_from_158()
Add an equivalent HOOD_140 column to a HOOD_158-keyed data.frame
morie_tps_add_hood_158_from_140()
Add an equivalent HOOD_158 column to a HOOD_140-keyed data.frame
morie_tps_aggregate_158_to_140()
Aggregate per-158 counts to per-140 counts (EXACT for pure cake-cuts)
morie_tps_analyze
RichResult-emitting analyses for the 13 TPS crime datasets
morie_tps_analyze_all()
Run the full TPS analysis capsule across many TPS data.frames
morie_tps_analyze_assault() morie_tps_analyze_autotheft() morie_tps_analyze_bicycletheft() morie_tps_analyze_breakandenter() morie_tps_analyze_communitysafetyindicators() morie_tps_analyze_hatecrimes() morie_tps_analyze_homicides() morie_tps_analyze_intimatepartnerandfamilyviolence() morie_tps_analyze_neighbourhoodcrimerates() morie_tps_analyze_robbery() morie_tps_analyze_shootingandfirearmdiscarges() morie_tps_analyze_theftfrommovingvehicle() morie_tps_analyze_theftover()
Convenience alias: full TPS capsule on the Assault dataset
morie_tps_analyze_csi_from_dataframes()
Toronto CSI per-year + per-ward from a named list of TPS data.frames
morie_tps_analyze_one()
Run the standard TPS analysis capsule on one data.frame
morie_tps_arima_forecast()
ARIMA(1,1,1) monthly-count forecast
morie_tps_assert_hood_version()
Assert the HOOD_* schema version of a TPS data.frame
morie_tps_available_formats()
List of formats this build can actually load
morie_tps_bivariate_moran()
Bivariate Moran's I between two attributes at the same polygons
morie_tps_bivariate_morans_i()
Bivariate Moran's I between two TPS categories
morie_tps_category_correlation_matrix()
Pearson correlation across TPS categories' per-hood counts
morie_tps_changepoint_detection()
Pettitt-style change-point on yearly incident counts
morie_tps_compare_hawkes_kernels()
Compare Hawkes models across kernel x baseline combinations
morie_tps_composite_index()
Composite per-neighbourhood crime-risk index across TPS categories
morie_tps_crime_compare()
Compare counts and trends across multiple TPS categories
morie_tps_criminal_network_graph()
Premise x neighbourhood co-occurrence network
morie_tps_csi_per_neighbourhood()
CSI per neighbourhood (HOOD_158)
morie_tps_csi_per_year()
Toronto CSI per fiscal year from per-category counts
morie_tps_csi_weight()
Return the CSI weight for a TPS open-data category
morie_tps_data_dir()
Default project data directory for TPS open data
morie_tps_dbscan_clusters()
DBSCAN density clusters on lat/long
morie_tps_disaggregate_140_to_158()
Disaggregate per-140 counts to per-158 counts (uniform-density)
morie_tps_district_for_centroid()
Return the pre-1998 borough name for a (lat, lon) centroid
morie_tps_fetch_category()
Fetch one TPS category as a CSV, paging until exhausted
morie_tps_fetch_dataframe()
Fetch a TPS category and return it as a data.frame
morie_tps_figures()
Export the TPS stochastic diagnostic figures
morie_tps_fokker_planck_grid()
1-D Fokker-Planck density evolution under OU drift+diffusion
morie_tps_getis_ord_g_star()
Local Getis-Ord Gi* statistic per neighbourhood
morie_tps_gini_concentration()
Gini coefficient of a numeric vector
morie_tps_hawkes_advanced
Non-stationary Hawkes with non-exponential kernels (R port)
morie_tps_hawkes_advanced_fit()
Fit a single (kernel, baseline) Hawkes specification
morie_tps_hawkes_markovian_vs_nonmarkovian()
Focused 2x2 Markovian vs non-Markovian Hawkes comparison
morie_tps_hawkes_temporal_fit()
Temporal exponential-kernel Hawkes fit
morie_tps_inspection_game_phase()
Helbing-Szolnoki inspection-game phase diagram
morie_tps_kde_density()
2-D kernel density estimate of geocoded incidents
morie_tps_langevin_simulate()
Euler-Maruyama Ornstein-Uhlenbeck simulation
morie_tps_layer_urls() MORIE_TPS_LAYER_URLS
TPS ArcGIS layer URLs known to MORIE
morie_tps_levy_flight_alpha()
Levy-flight tail exponent on consecutive-incident steps
morie_tps_list_categories()
List TPS categories known to the fetcher
morie_tps_list_datasets()
List all TPS datasets as a data.frame
morie_tps_list_formats()
Map TPS format name -> path of the file that would be loaded
morie_tps_load()
Load TPS dataset name in the given format
morie_tps_load_dataset()
Load one TPS dataset by category name (CSV thin path)
morie_tps_load_tps()
Load a TPS hub layer (incident category or aggregate layer)
morie_tps_load_tps_dataset()
Load a TPS incident dataset for the statistical-physics suite
morie_tps_local_morans_i()
LISA – local Moran's Ii per neighbourhood
morie_tps_lotka_volterra_police_crime()
Lotka-Volterra predator-prey on yearly crime counts
morie_tps_moran_sweep_heatmap()
Sweep polygon Moran's I across (category x year)
morie_tps_morans_i_neighbourhood()
Global Moran's I on neighbourhood-level incident counts
morie_tps_neighbourhood_concentration()
How concentrated is crime across Toronto's 158 neighbourhoods?
morie_tps_offence_summary()
Offence-distribution rollup for a TPS crime data.frame
morie_tps_polygon_morans_i()
Polygon-aware Moran's I on a value column
morie_tps_pretty_label()
Convert a SQL-style column name to a prose label
morie_tps_project_xy()
Project (lat, lon) to rotated planar kilometres
morie_tps_psdp_layers()
List the TPS PSDP layers wrapped by morie
morie_tps_render
Toronto Police Service map rendering (R-side)
morie_tps_render_choropleth()
Polygon choropleth map for Toronto (158 wards)
morie_tps_render_dbscan()
DBSCAN cluster figure on TPS-projected points
morie_tps_render_district_proportional()
District-level proportional-symbol map
morie_tps_render_points()
Render a TPS point-pattern map (incident dots, optional DBSCAN)
morie_tps_render_quad()
Four-panel composite of TPS rendering primitives
morie_tps_render_satscan_panel()
SaTScan-style spatial scan panel
morie_tps_render_yearly_grid()
Small-multiples panel of per-year TPS choropleths
morie_tps_resolve_hood_col()
Resolve which HOOD_* column to use on a TPS crime data.frame
morie_tps_ripley_k()
Ripley's K function at multiple radii
morie_tps_sarima_forecast()
Seasonal ARIMA forecast on monthly incident counts
morie_tps_sdb_reaction_diffusion()
Short-D'Orsogna-Brantingham 2008 hot-spot PDE
morie_tps_sdb_turing_demo()
Canonical Short-D'Orsogna-Brantingham Turing-pattern demo
morie_tps_seasonal_pattern()
Seasonal / cyclic incident-time patterns
morie_tps_spatial_summary()
Spatial rollup for a TPS crime data.frame
morie_tps_statphysics
Statistical physics of crime for TPS data
morie_tps_statphysics_analyze_all()
Run all four statistical-physics analyses on a list of categories
morie_tps_stochastic
Stochastic-physics-of-crime analyses for TPS data
morie_tps_temporal
Temporal analyses for TPS crime data
morie_tps_temporal_summary()
Temporal rollup for a TPS crime data.frame
morie_tps_urban_scaling_beta()
Bettencourt urban-scaling exponent across the 158 Toronto wards
morie_tps_use_of_force() morie_tpsuof()
TPS Use-of-Force rate + type distribution
morie_tps_year_over_year_trend()
Year-over-year linear trend on incident counts
morie_tps_year_to_hood_version()
Recommended HOOD_* schema version for a given OCC_YEAR
morie_tps_yoy_panel()
Side-by-side year-over-year panel across TPS categories
morie_tqang_angular_difference()
Signed shortest difference a - b, in [-pi, pi)
morie_tqang_cheatsheet()
One-line rationale mirroring the Python cheatsheet
morie_tqang_quantize_angles()
Uniform quantisation of angles to 2^bits equal sectors
morie_tqang_wrap_angle()
Wrap an angle to [-pi, pi)
morie_tqlld_cheatsheet()
One-line rationale mirroring the Python cheatsheet
morie_tqlld_lloyd_max_codebook()
Lloyd-Max optimal scalar codebook
morie_tqlld_quantize_with_codebook()
Quantise samples with a fixed codebook
morie_transfer_entropy_gaussian()
Gaussian transfer entropy / Granger conditional mutual information
morie_transfer_function()
Transfer function and coherence
morie_transfer_verify()
Verify a categorical variable that crossed from one program to another
morie_transform_T_F()
Horowitz's nonparametric estimators of T and F
morie_transform_asymptotics()
Asymptotic properties of Horowitz's T_n and F_n
morie_transform_prediction()
Prediction from a fitted transformation model
morie_transformer_genomic()
Transformer (1-head self-attention) genomic predictor (base R)
morie_tree_fit_cpp
Grow one regression / second-order tree (compiled)
morie_tree_predict_cpp
Predict from a flattened tree (compiled)
morie_trend_vector()
The trend vector T = (1/N) sum (a_i - A) S_i and its randomisation test
morie_trimmed_mean() morie_winsorize() morie_winsorized_mean() morie_winsorized_variance()
Trimming and Winsorizing
morie_trimmed_mean_anova() morie_brunner_dette_munk()
Heteroscedastic one-way designs
morie_trimmed_mean_se() morie_trimmed_mean_ci()
Inference for a single trimmed mean
morie_trkassign()
Minimum-cost detection-to-track assignment (p. 476)
morie_ts()
Construct a validated time series
morie_ts_accuracy()
Forecast accuracy metrics
morie_ts_acf()
Ordered autocorrelation / autocovariance of a series
morie_ts_arima()
Fit an ARIMA / SARIMA model
morie_ts_backtest()
Back-test a forecasting configuration on a holdout tail
morie_ts_decompose()
Decompose a seasonal time series
morie_ts_difference()
Difference a series, retaining the information to reverse it
morie_ts_forecast()
Forecast from a fitted time-series model
morie_ts_select()
Select ARIMA orders by information criterion
morie_ts_stationarity()
Test a series for stationarity
morie_ts_trim_forecast()
Trim a forecast to a maximum prediction-interval width
morie_ts_undifference()
Reverse morie_ts_difference()
morie_tsboot()
Native block bootstrap for time series
morie_tsimpute()
Missing-data imputation for time series (ch. 2 pp. 44-52)
morie_tsmixer()
TSMixer time-mixing and feature-mixing, all-MLP
morie_tsne_reduction()
t-SNE for non-linear dimension reduction (R parity)
morie_tsregmat()
Time series recast as a regression problem (ch. 5 p. 118)
morie_ttsAn()
Seasonal Hybrid ESD anomaly detection
morie_ttsplit()
Stable train/test split by identifier hash (p. 58)
morie_turan_graph()
The Turan graph: complete r-partite with parts as equal as possible
morie_turan_number()
Turan's theorem: most edges with no clique on r+1 vertices
morie_turning_point_test()
Turning-point test (native)
morie_tvtsplit()
Three-way train/validation/test split by identifier hash
morie_twelvefold_way()
The twelvefold way
morie_two_boot()
Native two-sample bootstrap
morie_two_group_binomial()
Two-group binomial tests and the odds ratio Wald interval
morie_two_point_bound()
Le Cam's two-point lower bound on a finite sample space
morie_two_sample_coverage()
Two-sample placement coverage (Gibbons Ch 2.11.2)
morie_two_sample_t_test()
Two-sample t-test with tidy output
morie_two_step_additive()
Two-step oracle-efficient additive model estimator
morie_twostage_design()
Optimal two-stage design sizes
morie_typset()
Typical-set membership test (eq. 4.29, p. 80)
morie_u_process()
U-statistic of order m
morie_ucbb()
UCB1 bandit policy on a realized-reward table
morie_unclr_phi() morie_unclr_Phi()
morie_unclr_phi
morie_uniform_matroid()
The uniform matroid U(k, n)
morie_union_bound_exists()
First moment / union bound
morie_unobserved_components()
Unobserved-components decomposition (trend + seasonal + irregular)
morie_urnpost()
Posterior over a discrete urn hypothesis (eq. 2.25-2.26, p. 28)
morie_urnpred()
Posterior predictive probability for the next draw (eq. 2.29-2.31, p. 29)
morie_userguide()
Get path to an MORIE userguide
morie_validate_cpads_data()
Validate a CPADS analysis data frame
morie_validate_outputs_manifest()
Validate outputs manifest structure
morie_van_der_waerden_test()
Van der Waerden two-sample normal-scores location test (Gibbons Ch 8.3.2)
morie_vanr1()
VanRaden Method 1 genomic relationship matrix
morie_var_backtest()
Joint VaR backtest: coverage plus independence
morie_var_cpp
morie_var_cpp
morie_variogram_composite_likelihood()
Composite-likelihood semivariogram estimation
morie_variogram_design()
Variogram-sampling design criteria
morie_vcov_cl()
One-way clustered covariance (native, CR0 / CR1)
morie_vcov_hac()
HAC (Newey-West) covariance (native)
morie_vcov_hc()
Heteroskedasticity-consistent covariance (native, HC0-HC5)
morie_vcov_robust()
Unified robust-covariance dispatcher (native)
morie_vecm()
Vector error-correction model (VECM)
morie_veil_of_darkness()
The veil-of-darkness contrast as a sign test with an identified bias ratio
morie_verify_pollution()
Run the pollution-to-health causal pipeline and report it
morie_verify_statistical_output()
Verify that a serialised statistical output meets minimum quality gates
morie_vertex_access_token()
Fetch and cache a Google Cloud access token via gcloud
morie_vertex_ask_gemini()
Send a single-turn prompt to Gemini via Vertex AI
morie_vertex_health_check()
Tiny smoke test for the Vertex AI client
morie_vertex_resolve_config()
Resolve Vertex AI configuration from environment variables
morie_vic_indigenous_ratio()
Indigenous victimisation rate ratio from the Victorian tables
morie_vic_lga_rates()
Rank Victorian local government areas by offence rate
morie_vic_offence_trend()
Offence-division trend from the Victorian criminal incidents table
morie_vif_tolerance()
Tolerance and variance inflation factor
morie_vol_garman_klass()
Garman-Klass OHLC volatility estimator
morie_vol_harmonic()
Harmonic-mean aggregation of per-period volatilities
morie_vol_noise()
Microstructure noise variance from high-frequency returns
morie_vol_parkinson()
Parkinson range volatility estimator
morie_volsabr()
SABR model Black implied volatility
morie_vpc()
Variance partition coefficient (latent-variable method)
morie_vpd_download_instructions()
Print step-by-step VPD GeoDASH download instructions
morie_wald_iv()
The Wald instrumental-variable ratio on a finite population
morie_walkfwd()
Walk-forward validation (ch. 5 p. 126)
morie_wasserman_aic()
AIC of a fitted model (Ch 13.6, wsmaic)
morie_wasserman_bic()
BIC of a fitted model (Ch 13.6, wsmbic)
morie_wasserman_boosting()
AdaBoost.M1 with decision stumps (Ch 22, wsmbst)
morie_wasserman_bootstrap_percentile()
Bootstrap percentile interval (Ch 8, wsmbpc)
morie_wasserman_bootstrap_pivotal()
Bootstrap pivotal interval (Ch 8, wsmbpv)
morie_wasserman_char_fn()
Empirical characteristic function (Ch 3, wsmcfn)
morie_wasserman_chebyshev_ineq()
Chebyshev bound P(|X-mu| >= k sigma) <= 1/k^2 (Ch 4, wsmcby)
morie_wasserman_chi_sq_gof()
Chi-square goodness-of-fit (Ch 10, wsmchi)
morie_wasserman_clt()
CLT standardised mean (Ch 5, wsmclt)
morie_wasserman_covariance()
Covariance Cov(X,Y) = E[XY] - EXE[Y] (Ch 4, wsmcov)
morie_wasserman_cramer_rao()
Cramer-Rao lower bound (Ch 9 Thm 9.23, wsmcrl)
morie_wasserman_credible_interval()
Equal-tail credible interval (Ch 11, wsmbcr)
morie_wasserman_delta_method()
Delta method standard error (Ch 5, wsmdlm)
morie_wasserman_directed_graph()
Directed graphical model factorisation (Ch 17, wsmdir)
morie_wasserman_dkw_cb()
DKW confidence band for F (Ch 7 Thm 7.5, wsmcb)
morie_wasserman_em_algorithm()
EM for a two-component normal mixture (Ch 9, wsmemt)
morie_wasserman_empirical_cdf()
Empirical distribution function (Ch 7, wsmcdf)
morie_wasserman_empirical_quantile()
Empirical quantile, Hyndman-Fan type 1 (Ch 7, wsmqtl)
morie_wasserman_entropy()
Entropy in nats (Ch 23, wsment)
morie_wasserman_expectation()
Expectation E[X] = int x f(x) dx by trapezoid (Ch 3, wsmexp)
morie_wasserman_fisher_info()
Fisher information by numeric curvature (Ch 9, wsmfis)
morie_wasserman_gibbs_sampler()
Gibbs sampler for a bivariate normal (Ch 24.4, wsmgib)
morie_wasserman_gmm_em()
Two-component Gaussian mixture via EM (Ch 19, wsmgmm)
morie_wasserman_graphical_model()
Normalised clique-potential model with its mode (Ch 17, wsmgrp)
morie_wasserman_hmm_forward()
HMM forward algorithm with per-step scaling (Rabiner 1989; Wasserman Ch 23 covers the underlying Markov chains) (wsmhmm)
morie_wasserman_hoeffding()
Hoeffding bound for bounded variables (Ch 4, wsmhfd)
morie_wasserman_influence_function()
Empirical influence via the sensitivity curve (Ch 7, wsmifn)
morie_wasserman_kernel_regression()
Nadaraya-Watson kernel regression (Ch 20 Def 20.21, wsmcrk)
morie_wasserman_kfold_cv()
K-fold cross-validated squared error (Ch 13.6, wsmcvr)
morie_wasserman_kmeans()
K-means by Lloyd's algorithm (Ch 19, wsmkmn)
morie_wasserman_kullback_leibler()
Kullback-Leibler divergence (Ch 23, wsmkbk)
morie_wasserman_lasso()
Lasso by cyclic coordinate descent (Ch 13, wsmlas)
morie_wasserman_least_squares()
Ordinary least squares with classical errors (Ch 13 Thm 13.4, wsmlsr)
morie_wasserman_likelihood()
Likelihood L(theta) = prod f(X_i; theta) (Ch 9, wsmlik)
morie_wasserman_lln()
Law of large numbers: running means (Ch 5, wsmlln)
morie_wasserman_local_polynomial()
Local polynomial regression (Ch 20, wsmlpr)
morie_wasserman_log_likelihood()
Log-likelihood with per-observation terms (Ch 9, wsmllk)
morie_wasserman_log_linear()
Saturated log-linear model for a two-way table (Ch 17, wsmlgc)
morie_wasserman_logistic_regression()
Logistic regression MLE by Newton-Raphson (Ch 13.7, wsmlgr)
morie_wasserman_markov_ineq()
Markov bound P(X >= a) <= EX/a for X >= 0 (Ch 4, wsmmrk)
morie_wasserman_mcmc_metropolis()
Random-walk Metropolis sampler (Ch 24.3, wsmmcm)
morie_wasserman_mgf()
Empirical MGF M(t) = (1/n) sum e^{t X_i} (Ch 3, wsmmgf)
morie_wasserman_minimax()
Minimax value of a finite decision problem (Ch 12, wsmmin)
morie_wasserman_mle_asymptotic()
MLE asymptotic standard error and Wald interval (Ch 9 Thm 9.18, wsmasm)
morie_wasserman_mutual_info()
Mutual information of two discrete samples (Ch 23, wsmmtl)
morie_wasserman_nonparametric_boot()
Nonparametric bootstrap standard error (Ch 8, wsmnpb)
morie_wasserman_odds_ratio()
Odds ratio with Woolf interval (Ch 16, wsmodd)
morie_wasserman_parametric_boot()
Parametric bootstrap (Ch 8, wsmprb)
morie_wasserman_pca()
Principal component analysis (Ch 14, wsmpca)
morie_wasserman_poisson_regression()
Poisson log-linear regression MLE (Ch 13, wsmpsr)
morie_wasserman_posterior()
Grid posterior p(theta | x) (Ch 11, wsmbay)
morie_wasserman_posterior_mean()
Posterior mean from a grid posterior (Ch 11, wsmpst1)
morie_wasserman_relative_risk()
Relative risk with Katz interval (Ch 16, wsmrrr)
morie_wasserman_ridge()
Ridge regression (Ch 13, wsmrgr)
morie_wasserman_smoothing_spline()
Discrete smoothing spline (Ch 20.5, wsmsmp)
morie_wasserman_svm()
Linear SVM by pairwise dual ascent (Ch 22, wsmsvm)
morie_wasserman_undirected_graph()
Exact undirected clique model (Ch 17, wsmund)
morie_wasserman_variance()
Variance Var(X) = E[X^2] - E[X]^2 (Wasserman Ch 3, morie.fn wsmvar)
morie_wasserman_viterbi()
Viterbi decoding in log space (Ch 23, wsmvit)
morie_wasserman_white_huber()
White-Huber sandwich covariance (Ch 9, wsmwhz)
morie_wasserstein_test()
Two-sample permutation test on the 1-Wasserstein distance
morie_wavelet_time_series()
Discrete wavelet decomposition for a time series
morie_wayback_url()
Resolve a Wayback Machine snapshot URL (via rmoriebricklayer)
morie_weight_cbps()
Covariate-balancing propensity score (Imai & Ratkovic 2014)
morie_weight_diagnostic()
Balance diagnostics for a morie_weight object
morie_weight_entropy()
Entropy-balancing weights (Hainmueller 2012)
morie_weight_ow()
Overlap weights (Li, Morgan & Zaslavsky 2018)
morie_weight_ps()
Propensity-score weights (logistic base learner)
morie_weight_stabilized()
Stabilized IPW (Austin 2009 / Robins et al. 2000)
morie_weight_super()
SuperLearner-style ensemble propensity weights
morie_weight_trimming()
Trim extreme weights from a morie_weight object
morie_weighted_logrank()
Weighted log-rank tests (Peto-Peto, Gehan-Wilcoxon, Tarone-Ware)
morie_weightit() print(<morie_weightit>)
Balancing weights by WeightIt's rules, natively
morie_weights_bootstrap()
Bootstrap replicate weights (Rao-Wu rescaling within strata)
morie_weights_brr()
Balanced Repeated Replication (BRR) weights
morie_weights_calibrate_to_totals()
Dispatch helper – calibrate to totals via "raking" or "greg"
morie_weights_combined()
Combined design x nonresponse x post-strat (x trim) pipeline
morie_weights_deff()
Kish design effect (n / ESS)
morie_weights_design()
Design weights from inclusion probabilities
morie_weights_detect_extreme()
Detect extreme weights at +/- k * IQR or by absolute percentile
morie_weights_diagnostics()
Comprehensive weight diagnostics
morie_weights_ess()
Kish effective sample size: \((\sum w_i)^2 / \sum w_i^2\)
morie_weights_fay_brr()
Fay's BRR weights with perturbation coefficient fay_coefficient in [0,1)
morie_weights_greg()
Generalised regression (GREG) calibration
morie_weights_jackknife()
Jackknife replicate weights (JK1 delete-1 or JKn stratified delete-n)
morie_weights_multiframe()
Multi-frame (dual-frame) survey weights (Hartley compositing)
morie_weights_nonresponse()
Non-response adjustment within cells
morie_weights_normalize()
Normalise weights so they sum to n (sample) or N (population)
morie_weights_poststratify()
Post-stratification weight adjustment
morie_weights_propensity_nonresponse()
Propensity-score non-response weights (logistic)
morie_weights_rake()
Raking calibration (iterative proportional fitting)
morie_weights_replicate_variance()
Variance estimation from replicate estimates
morie_weights_sdr()
Successive Difference Replication (SDR) weights
morie_weights_smooth()
Smooth survey weights via shrinkage toward the mean (or log-mean)
morie_weights_totals()
Spatial weights constants
morie_weights_trim()
Trim extreme weights at percentile cutpoints
morie_welch_test() morie_yuen_test() morie_yuen_paired()
Welch's and Yuen's tests for two groups
morie_wilcox_test()
Native Wilcoxon rank-sum permutation test
morie_wilcoxon_power()
Monte-Carlo power of the Wilcoxon signed-rank test (Gibbons Ch 5.7.3)
morie_wilcoxon_signed_rank_test()
Wilcoxon signed-rank test (paired)
morie_winkler()
Winkler interval score (ch. 17)
morie_wnominate_fit()
W-NOMINATE ideal points by alternating optimisation
morie_write_audit_markdown()
Write a Markdown audit report
morie_write_parquet()
Write a data frame to Parquet
morie_write_synthetic_data()
Write synthetic epidemiology-style data to CSV
morie_wsm_admissible()
Admissibility of decision rules by risk dominance
morie_wsm_bagging()
Bagging
morie_wsm_bootstrap()
Bootstrap variance estimator
morie_wsm_importance_sampling()
Importance sampling
morie_wsm_kde()
Kernel density estimate with Silverman's window-width rules
morie_wsm_mle()
Maximum likelihood as an M-estimator
morie_wsm_plug_in()
Plug-in estimator of a statistical functional
morie_xgboost_objective()
XGBoost regularized objective (R parity)
morie_xml_sax()
Parse XML natively with SAX-style callbacks (pure R)
morie_xpehh1()
Cross-population EHH (XP-EHH)
morie_yangr()
Yang et al. realized relationship matrix
morie_yule_walker()
Yule-Walker AR estimation
morie_zap_predict() morie_zap_mean_variance() morie_zap_loglik() morie_zap_mle() morie_zap_link()
Zero-altered Poisson models
morie_zip_vuong_boundary()
Vuong's test of zero-inflated against plain Poisson at the boundary
morie_zonal_ebm()
Zonal energy-balance model (Budyko-Sellers)
motfsr_alphabet_of()
motfsr_alphabet_of
motfsr_bayes_threshold()
motfsr_bayes_threshold
motfsr_cheatsheet()
motfsr_cheatsheet
motfsr_lambda_grid()
motfsr_lambda_grid
motfsr_log_component()
motfsr_log_component
motfsr_log_odds_matrix()
motfsr_log_odds_matrix
motfsr_mm_fit()
motfsr_mm_fit
motfsr_mu()
motfsr_mu
motfsr_normalise_windows()
motfsr_normalise_windows
motfsr_prepare()
motfsr_prepare
motfsr_run()
motfsr_run
motfsr_score_sequence()
motfsr_score_sequence
motfsr_theta_from_subsequence()
motfsr_theta_from_subsequence
motfsr_uniform_theta()
motfsr_uniform_theta
mpfn_cheatsheet()
mpfn_cheatsheet
mpfn_is_permutation_invariant()
mpfn_is_permutation_invariant
mpfn_message()
mpfn_message
mpfn_message_passing()
mpfn_message_passing
mpfn_readout()
mpfn_readout
mpfn_sig()
mpfn_sig
mpfn_update_gru()
mpfn_update_gru
mqtmpl_cheatsheet()
mqtmpl_cheatsheet
mqtmpl_check_method()
mqtmpl_check_method
mqtmpl_genotype_probabilities()
Qk left, qk+1 right
mqtmpl_haldane()
mqtmpl_haldane
mqtmpl_hmm_genotype_probabilities()
mqtmpl_hmm_genotype_probabilities
mqtmpl_imputation_weights()
mqtmpl_imputation_weights
mqtmpl_kw_n_imp()
mqtmpl_kw_n_imp
mqtmpl_lod_support_interval()
mqtmpl_lod_support_interval
mqtmpl_method_status()
mqtmpl_method_status
mqtmpl_permutation_threshold()
mqtmpl_permutation_threshold
mqtmpl_sample_genotypes()
mqtmpl_sample_genotypes
mqtmpl_scan_cim()
mqtmpl_scan_cim
mqtmpl_scan_imp()
mqtmpl_scan_imp
mqtmpl_scanone()
mqtmpl_scanone
mqtmpl_single_marker()
mqtmpl_single_marker
mrm_admissions()
Admissions implied by a population and a length of stay
mrm_adp()
Average daily population
mrm_adp_from_counts()
Person-days estimated from periodic headcounts
mrm_alos()
Average length of stay
mrm_anova_bonferroni()
One-way ANOVA with pairwise Bonferroni-adjusted t-tests
mrm_anova_oneway()
One-way ANOVA + Tukey HSD post-hoc
mrm_anova_power()
Power of one-way ANOVA given Cohen's f
mrm_assumptions_check()
Composite Rubin-style identifiability assumption check
mrm_causal_design()
Designed-experiment convenience wrapper around the morie causal estimator family
mrm_check_balancing()
Composite balance verdict using the Imbens-Rubin %SMD criterion
mrm_check_overlap()
Propensity-score support overlap diagnostic (Cole-Hernan 2008)
mrm_classify_mandela()
Mandela Rules classifier for solitary-confinement placements
mrm_clt_demo()
Central Limit Theorem demonstrator
mrm_design
Experimental-design callables (designexptr-inspired)
mrm_diagnostics
Causal-inference diagnostics (R parity)
mrm_doe
Design-of-Experiments toolkit (R parity)
mrm_factorial_2k()
2^k factorial-design analysis with main effects + interactions
mrm_fractional_factorial()
Fractional 2^(k-p) factorial: main effects + alias structure
mrm_gentrification
Baseline-conditional gentrification coding (MRM primitive)
mrm_gentrification_panel()
Construct a baseline-conditional 3-level gentrification factor
mrm_graeco_latin()
Graeco-Latin square four-way ANOVA (row, col, Latin, Greek)
mrm_kulldorff
Kulldorff space-time scan statistic on TPS event data
mrm_latin_square()
Latin-square three-way ANOVA (row, col, treatment)
mrm_lisa
LISA (Local Indicators of Spatial Association) on polygon-level crime data + per-year polygon Moran's I time series
mrm_mathstats
Mathematical-statistics / simulation / computation toolkit (R parity)
mrm_mc_power()
Empirical Monte-Carlo power
mrm_median_causal_effect()
Median causal effect via 1:1 nearest-neighbour PS matching
mrm_morans_i()
Moran's I statistic for residual spatial autocorrelation
mrm_oneprop_test()
One-proportion test (binomial exact + Wald approximation)
mrm_otis
MRM-framework analyses on Ontario OTIS data
mrm_otis_mandela_spectrum()
Mandela Rules apples-to-apples spectrum on OTIS b01
mrm_otis_mortification_cooccurrence()
Pairwise Cramer's V of OTIS b01 alert columns (mortification proxy)
mrm_otis_placement_concentration()
Per-individual segregation-placement-count concentration on OTIS b09
mrm_otis_region_locality()
OTIS b01 region locality: chi-square + diagonal-share
mrm_otis_seg_duration_km()
Kaplan-Meier survival on OTIS b01 segregation-placement durations
mrm_otis_stock_flow()
Stock and flow across the OTIS strata
mrm_period_days()
Period length in days, from dates
mrm_perm_block()
Block-permutation test for treatment effect
mrm_pit()
Probability Integral Transform (PIT)
mrm_primitives_ordinal
Threshold-specific ordinal-logit primitive (MRM)
mrm_qq_plot()
Q-Q plot coordinates against a reference distribution
mrm_random_latin()
Generate a random k x k Latin square
mrm_rcbd()
Randomised complete block design (RCBD) two-way ANOVA
mrm_response_surface()
Second-order response-surface fit (Box-Wilson 1951)
mrm_samples
Included reference data samples and dataset fetchers
mrm_siu
MRM-framework analyses on Ontario SIU (Special Investigations Unit) data
mrm_siu_case_to_decision_km()
KM survival of SIU case-to-decision gap per police service
mrm_siu_outcome_classifier()
Tabulate SIU Director's-decision outcomes
mrm_siu_per_service_rate()
Per-police-service SIU case-rate summary
mrm_spatial_spillover
Spatial Durbin / SAR direct-indirect-total decomposition (MRM primitive)
mrm_spatial_spillover_decomposition()
SDM direct / indirect / total decomposition
mrm_standardised_difference()
Imbens-Rubin standardised %SMD per covariate
mrm_stay_summary()
Length of stay with its distribution and interval
mrm_stock_flow()
Stock and flow side by side, with the decomposition
mrm_synthetic_area_exposure()
Compute the synthetic exposure offset for each area
mrm_synthetic_exposure
Synthetic small-area-estimated exposure offset (MRM primitive)
mrm_threshold_coefficient()
Extract coefficient(s) for one covariate across all thresholds
mrm_threshold_specific_ordinal()
Fit a threshold-specific cumulative-logit ordinal regression
mrm_tps
MRM-framework analyses on Toronto Police Service (TPS) open data
mrm_tps_kulldorff_scan()
Run a 3-d (lat, lon, time) Kulldorff scan with MC inference
mrm_tps_levy_scaling()
Levy-flight Hill-MLE exponent on TPS inter-incident step lengths
mrm_tps_lisa()
Local Moran's I per polygon + quadrant + 999-permutation significance
mrm_tps_load_hawkes_refit()
Load the precomputed per-category TPS Hawkes refit manifest
mrm_tps_moran_clustering()
Global Moran's I + DBSCAN summary on TPS lat/long event data
mrm_tps_neighbourhood_recurrence_km()
Kaplan-Meier inter-event recurrence on TPS by neighbourhood
mrm_tps_polygon_moran_per_year()
Per-year global Moran's I time series across a polygon surface
mrm_two_treatment_test()
Two-treatment outcome comparison with three assumption regimes
mrm_twoprop_test()
Two-proportion test (chi-square + Fisher exact + Wald)
mrm_uof
Generic Multilevel Reconciliation Methodology (MRM) Use-of-Force callables
mrm_uof_data_quality_audit()
Schema, null, and suspect-value audit
mrm_uof_demographic_disparity()
Demographic disparity in outcome rates with risk-ratio CIs
mrm_uof_force_concentration()
Concentration of UoF incidents across forces / services
mrm_uof_region_locality()
Region-at-time vs region-now locality contingency
mrm_uof_weapon_diversity()
Weapon-by-force contingency test
mrm_uof_yoy_change()
Year-on-year change in incident counts
mrm_var_test()
Chi-square test for variance (Wilks 1962)
mtdrl_TabularHistoryAgent()
mtdrl_TabularHistoryAgent
mtdrl_bandit_tasks()
mtdrl_bandit_tasks
mtdrl_cheatsheet()
mtdrl_cheatsheet
mtdrl_history_features()
mtdrl_history_features
mtdrl_run()
mtdrl_run
muzero_MinMax()
muzero_MinMax
muzero_Node()
muzero_Node
muzero_add_noise()
muzero_add_noise
muzero_backup()
muzero_backup
muzero_cheatsheet()
muzero_cheatsheet
muzero_gamma_rv()
muzero_gamma_rv
muzero_search()
muzero_search
muzero_select()
muzero_select
n_effective_tests()
Effective number of independent tests from a correlation matrix
n_stat_commands()
Total number of registered commands (excluding aliases)
nested_cross_validate()
Nested cross-validation with inner-loop grid search
nestvc()
Variance components of a two-stage nested design
nlsgn()
Nonlinear least squares by Gauss-Newton
nnlsq()
Non-negative least squares
nobs(<morie_lm>)
Number of observations in method for morie_lm objects
node2v_alpha_pq()
node2v_alpha_pq
node2v_cheatsheet()
node2v_cheatsheet
node2v_dist()
node2v_dist
node2v_skipgram_pairs()
node2v_skipgram_pairs
node2v_transition_probabilities()
node2v_transition_probabilities
node2v_walk()
node2v_walk
noise_schedule()
Linear noise schedule, scaled down
normality_suite()
Run a suite of normality tests
normtl()
Tolerance factor for normally distributed populations
ntrtau()
Sample size for testing Kendall's tau (Noether)
number_needed_to_harm()
Number needed to harm (NNH) – sign-reversed NNT
number_needed_to_treat()
Number needed to treat (NNT) = 1 / |RD|
nw_regression()
Nadaraya-Watson kernel regression
ocrwit_cheatsheet()
ocrwit_cheatsheet
ocrwit_mask_units()
ocrwit_mask_units
ocrwit_normalise_bbox()
ocrwit_normalise_bbox
ocrwit_patch_of_box()
ocrwit_patch_of_box
ocrwit_segment_layout_boxes()
ocrwit_segment_layout_boxes
odds_ratio()
Odds ratio for a 2x2 table [[a, b], [c, d]]
odds_ratio_table()
Odds-ratio table from a fitted logistic GLM
offlrl_as_dist()
offlrl_as_dist
offlrl_cheatsheet()
offlrl_cheatsheet
offlrl_logsumexp()
offlrl_logsumexp
offlrl_lookup()
offlrl_lookup
offlrl_safe_max_key()
offlrl_safe_max_key
offlrl_softmax()
offlrl_softmax
omega_squared()
Omega-squared – less biased than eta-squared
omitted_variable_bias()
Omitted-variable bias analysis (sensemakr framework)
one_proportion_ztest()
One-sample z-test for a proportion
one_sample_ttest()
One-sample Student's t-test
one_way_anova()
One-way between-subjects ANOVA
open_record()
Open a sealed record
optimal_duration()
Release time maximising utility
or_to_d()
Convert odds ratio to Cohen's d (Hasselblad & Hedges, 1995)
or_to_r()
Convert OR to Pearson r via d
paired_permutation_test()
Paired permutation test (sign-flipping)
paired_ttest()
Paired-sample t-test
panel_differences()
Post-minus-pre panel differences
papadk()
Papadakis nearest-neighbour adjustment for field trials
parametric_bootstrap()
Parametric bootstrap
partial_correlation()
Partial Pearson correlation controlling for covariates
partial_eta_squared()
Partial eta-squared
pburg()
Burg autoregressive power spectral density
pcgenv()
PCG Shannon-energy envelope
pcgmur()
PCG murmur likelihood score
pcgseg()
PCG S1/S2 heart-sound segmentation
pchnrm()
Pearson chi-square test of normality
pearson_correlation()
Pearson product-moment correlation
permutation_fdr()
Permutation-based FDR control via empirical null p-value distribution
permutation_fwer()
Permutation-based FWER control via step-down max-T (Westfall-Young)
permutation_test()
Two-sample permutation test
pettitt_changepoint()
Pettitt non-parametric change-point detection
pfd()
Petrosian fractal dimension
ph_assumption_test()
Proportional-hazards assumption test (Schoenfeld-style)
phi_coefficient()
Phi coefficient for a 2x2 contingency table
piecewise_trend()
Evaluate the piecewise-linear trend (Eq. 4 of Taylor & Letham 2018)
placebo_did()
Pre-period placebo DiD
plackt()
Plackett's bivariate distribution
plot(<morie_bayes_fit>)
Plot method for morie_bayes_fit objects
plot(<morie_cluster>)
Default 2-D cluster plot
plot(<morie_lm>)
Default diagnostic plot for a morie_lm
plot(<morie_rich_result>)
Default plot for morie rich-result objects
plot(<morie_spatial>)
Plot method for morie_spatial objects
plot(<morie_ts_forecast>)
Plot method for morie_ts_forecast objects
point_biserial_correlation()
Point-biserial correlation
posterior_mean()
DDPM posterior mean
predict(<morie_cluster>)
Assign new data to existing clusters without re-fitting
predict(<morie_gam>)
Predictions from a native generalized additive model
predict(<morie_lm>)
Predict from a morie_lm, optionally with intervals
predict(<morie_ml_fit>)
Predict from a trained model
prediction_interval()
Prediction interval for a new study (random-effects meta)
print(<morie_arsau_analysis_result>)
Print method for morie_arsau_analysis_result objects
print(<morie_arsau_result>)
Print method for morie_arsau_result objects
print(<morie_audit_result>)
Print method for audit results
print(<morie_bayes_fit>)
Print method for morie_bayes_fit objects
print(<morie_city_profile>)
Print method for morie_city_profile objects
print(<morie_cluster>)
Print method for morie_cluster objects
print(<morie_cluster_spec>)
Print method for morie_cluster_spec objects
print(<morie_distribution>)
Print method for morie_distribution objects
print(<morie_dml_clustered>)
Print method for morie_dml_clustered objects
print(<morie_eda_table>)
Print method for morie_eda_table objects
print(<morie_fairness_result>)
Print method for morie_fairness_result objects
print(<morie_hawkes_fit>)
Print method for morie_hawkes_fit objects
print(<morie_hawkes_st_fit>)
Print method for morie_hawkes_st_fit objects
print(<morie_laniyonu_ard_result>)
Print method for morie_laniyonu_ard_result objects
print(<morie_laniyonu_gp_result>)
Print method for morie_laniyonu_gp_result objects
print(<morie_laniyonu_smi_result>)
Print method for morie_laniyonu_smi_result objects
print(<morie_lm>)
Print method for morie_lm objects
print(<morie_lm_spec>)
Print method for morie_lm_spec objects
print(<morie_lmm>)
Print a morie mixed model
print(<morie_ml_fit>)
Print method for morie_ml_fit objects
print(<morie_ml_model>)
Print method for morie_ml_model objects
print(<morie_ml_recipe>)
Print method for morie_ml_recipe objects
print(<morie_ml_split>)
Print method for morie_ml_split objects
print(<morie_mrm_result>)
Print method for morie_mrm_result objects
print(<morie_mrm_uof_result>)
Print method for morie_mrm_uof_result objects
print(<morie_multiple_testing_result>)
Print method for morie_multiple_testing_result objects
print(<morie_otis_analysis_result>)
Print method for morie_otis_analysis_result objects
print(<morie_otis_result>)
Print method for morie_otis_result objects
print(<morie_semipar_kernels>)
Print method for morie_semipar_kernels objects
print(<morie_spatial>)
Print method for morie_spatial objects
print(<morie_stat_command>)
Print method for morie_stat_command objects
print(<morie_test_result>)
Print method for morie_test_result objects
print(<morie_tokenizer>)
Print method for morie tokenizer
print(<morie_tps_result>)
Pretty-print method for morie_tps_result objects
print(<morie_tps_spatial_advanced_result>)
Print method for morie_tps_spatial_advanced_result objects
print(<morie_tps_spatial_result>)
Print method for morie_tps_spatial_result objects
print(<morie_tps_stochastic_result>)
Print method for morie_tps_stochastic_result objects
print(<morie_tps_temporal_result>)
Print method for morie_tps_temporal_result objects
print(<morie_ts_forecast>)
Print method for morie_ts_forecast objects
print(<morie_ts_model>)
Print method for morie_ts_model objects
print(<morie_variable_taxonomy>)
Print method for taxonomy entries
print(<summary.morie_lmm>)
Print a morie mixed-model summary
probabilistic_bias_analysis()
Probabilistic (Monte Carlo) sensitivity analysis
prophet_design()
Stack trend, seasonality and holiday columns into one design
prophet_predict()
Forecast at new times, reusing the fitted coefficients
prphet_cheatsheet()
prphet cheatsheet
prtcl_cheatsheet()
prtcl cheatsheet
prxgms_cheatsheet()
prxgms cheatsheet
psis_loo()
PSIS leave-one-out cross-validation
qrntcq_cheatsheet()
qrntcq cheatsheet
quarantine_efficacy()
Quarantine efficacy (eq. 1 of Ashcroft et al. 2021)
r_effect_size()
Pearson r as an effect size with Fisher-z CI
r_squared()
Coefficient of determination R^2
r_to_d()
Convert Pearson r to Cohen's d
r_to_or()
Convert Pearson r to OR via d
ramsey_reset_test()
Ramsey RESET test for functional-form misspecification
random_effects_meta()
Random-effects (DerSimonian-Laird) meta-analytic pooling
rank_biserial_correlation()
Rank-biserial correlation for two independent samples
rate_ratio()
Incidence rate ratio (IRR)
reassigned_spectrogram()
Reassigned spectrogram
register_stat_command()
Register a stat_command in the package-level registry
regression_table()
Side-by-side regression table for multiple model fits
relative_efficiency()
Relative efficiency of m imputations
relative_utility()
Utility of one standard quarantine relative to another
repeated_cv()
Repeated K-fold cross-validation
repeated_measures_anova()
One-way repeated-measures ANOVA
residuals(<morie_lm>)
Extract residuals from method for morie_lm objects
residuals(<morie_lmm>)
Residuals of a morie mixed model
resolve_stat_command()
Resolve a command by canonical name or alias
rhobin()
Lower bound on the equicorrelation of exchangeable binary data
risk_difference()
Risk difference for a 2x2 table
risk_ratio()
Risk ratio (relative risk) for a 2x2 table
rosenbaum_bounds()
Rosenbaum sensitivity analysis for matched-pair designs
rotate_dek()
Rotate a DEK: re-encrypt one record
rotate_kek()
Rotate the KEK: re-wrap every DEK, no record ciphertext touched
rotation_cost()
Cost model: single-key vs envelope rotation
rpmcor()
Correlation between and within subjects for repeated measurements
rrexct()
Exact confidence interval and test for the ratio of two Poisson rates
rrint()
RR interval series from R-peak sample indices
rubins_rules()
Pool multiply imputed estimates by Rubin's rules
run_stat_command()
Run a command's REPL handler with positional/keyword arguments
runs_test()
Wald-Wolfowitz runs test for randomness
sampen()
Sample entropy
sample_mean() raw_moment() central_moment() skewness_coeff() kurtosis_coeff() rms_value() mean_squared_error() root_mean_squared_error() ensemble_average() ensemble_variance() esl_total_sum_squares() popvar()
Sample moments, errors and ensemble statistics
schomg()
Scored chi-square test of homogeneity
score_data_quality()
Multi-dimensional data quality scores
score_test()
Score (Lagrange multiplier) test
scpmf() scnbmf() scpprd() scpwld()
Impacts, predictions and Wald test of spatial-lag count models
seal_record()
Seal a record under its DEK
semi_partial_correlation()
Semi-partial (part) correlation
sensitivity
Sensitivity analysis for causal inference assumptions
sensitivity_rosenbaum()
Rosenbaum bounds sensitivity analysis (data-frame interface)
sensitivity_summary()
Generate a comprehensive sensitivity-analysis summary
setT()
PMA_k attention pooling from Lee et al. (2019)
set_transformer()
Back-compatible wrapper over setT (old name)
sfgetis() spatial_filter() sfloc() sfmemb() sfmi() sforth() sfredu()
Eigenvector and Getis spatial filtering utilities
sgcar()
Conditional autoregressive (CAR) model, fitted by maximum likelihood
sgolay()
Savitzky-Golay smoothing (direct alias)
shapiro_wilk()
Shapiro-Wilk test for normality
sidak()
Sidak FWER correction
silverman_bandwidth()
Silverman rule-of-thumb bandwidth
simes_combined()
Simes test for the global null
singular_value_adjust()
SVD cap on the prewhitening matrix
sobol_sequence()
Sobol low-discrepancy sequence in [0, 1)^dim
soft_threshold()
Soft-thresholding
soft_value_iteration()
Soft value iteration on a deterministic tabular MDP
spanis()
Geometric anisotropy: correcting direction dependence by a linear map
spatial_sir() spatial_frailty() spatial_cure_rate()
Spatial epidemic and cluster models
spbayr()
Bayesian hierarchical spatial models for disease mapping
spbesf()
Modified Bessel function of the second kind, K_nu
spbino()
Binomial point process: a FIXED number of independent uniform points
spblup()
Best linear unbiased predictor: ordinary kriging
spbym()
Besag-York-Mollie convolution model for disease mapping
spcar()
Conditional autoregressive model: the conditional specification
spcirc()
Circular semivariogram model
spcmp()
Likelihood-ratio tests and AIC for nested spatial covariance models
spcont()
Mean-square continuity, decided by the covariance at the origin
spconv()
Convolution representation of a stationary random field
spcovf()
Empirical covariance function of a second-order stationary field
spcsr()
Complete spatial randomness, and a quadrat check of it
spearman_correlation()
Spearman rank correlation
specification_curve()
Specification curve analysis
spexp()
Exponential semivariogram model
spffun()
F-function: the empty space (point-to-nearest-event) distribution
spgaus()
Gaussian semivariogram model
spgfun()
G-function: the nearest-neighbour distance distribution
spglmk()
Spatial prediction in a generalized linear model
spglmm()
Conditional specification of a spatial GLMM
spgls()
Generalised least squares with a known covariance matrix
spglsv()
Semivariogram fit by generalized least squares (Cressie 1985)
spgwr()
Geographically weighted regression: locally varying coefficients
spgwrb()
GWR bandwidth selection by cross-validation or corrected AIC
spgwrk()
GWR kernel weight functions
spicar()
Intrinsic CAR (ICAR) prior: precision structure, not a fit
spiso()
Isotropy check by comparing directional semivariograms
spkcrs()
Cross K-function for bivariate point patterns
spkfnn()
Leave-one-out cross-validation of a kriging model
spkfun()
Ripley's K-function
spkrnv()
Parametric kernel semivariogram
spkwt()
Solve the kriging system for the weights
splfun()
L-function, the variance-stabilised K-function
splgk()
Lognormal kriging
spmatr()
Matern covariance function class
spmenv()
Moments of Moran's I under Gaussianity and under randomization
spmidw()
Inverse distance weighted interpolation
spml()
Covariance parameters by maximum or restricted maximum likelihood
spmsd()
Mean-square differentiability, from the even derivatives of C at 0
spmsim()
Multiscale GWR: one bandwidth per covariate
spmwst()
Moving-window kriging with locally re-estimated semivariograms
spnest()
Nested semivariogram: the linear model of regionalization
spnpsv()
Nonparametric (Shapiro-Botha) semivariogram
spnscl()
Neyman-Scott cluster process: second-order behaviour
spnsr()
Effects of nugget, sill and range on a kriging prediction
spnst()
Parametric non-stationary correlation: the point-source model
spnug()
Nugget effect in the semivariogram: discontinuity at the origin
spols()
Ordinary least squares fitting of a semivariogram model
spperiod()
Periodogram of a process observed on a rectangular lattice
sppfe() sppsar() sppsem() sppsdm() sppre() sppdyn() sppsac() sppbe() sppcov() sppres() sppdiag() spplm() spphaus() sppiv() sppgmm() sppboot()
Spatial panel models, tests and resampling
sppois()
Homogeneous Poisson process (HPP), the CSR reference model
sppow()
Power semivariogram model (unbounded)
sppql()
Fit a spatial GLMM by pseudo-likelihood
spprmf() sprmfdi() splgtmf() spprprd() splgtml() spprml() sptfx() sptrx()
Spatial probit and logit: impacts, probabilities, simulated ML and panels
spreml()
Restricted maximum likelihood (REML) for semivariogram parameters
sprfss()
Which stationarity assumption the data can support
spsar()
Spatial autoregressive (lag) model
spsemv()
Empirical semivariogram: half the mean squared difference
spskrg()
Simple kriging: the mean is known
spspec()
Sum-of-sinusoids (spectral) representation, eqs (2.26)-(2.27)
spsph()
Spherical semivariogram model
spssoc()
Covariance and semivariogram under second-order stationarity
spstcn()
Non-separable spatio-temporal covariance functions
spstcv()
Separable spatio-temporal covariance functions
spstp()
Spatio-temporal point process intensity
spstvg()
Empirical spatio-temporal semivariogram
sptent()
Tent semivariogram model
sptgk()
Trans-Gaussian kriging
spthom()
Thomas process: the Neyman-Scott process with Gaussian offspring
spwkth()
Spectral density of a stationary field from its covariance function
spwls()
Weighted least squares fitting of a semivariogram model
standardized_coefficients()
Standardised regression coefficients (beta weights)
stat_bridge_exec()
Execute a single command and return the resulting text
stat_bridge_fn_info()
Inspect a single command by name
stat_bridge_fn_search()
Search the registry for matching commands
stat_bridge_help()
Formatted text dump of the command registry
stat_bridge_main()
Command-line dispatcher
stat_bridge_registry_json()
JSON enumeration of all registered commands
stat_bridge_verify()
Self-test enumeration helper
stat_command()
Construct a stat_command entry
statistics
Comprehensive hypothesis testing suite for epidemiological research
storey_q()
Storey q-value procedure (adaptive FDR)
stouffer_combined()
Stouffer's z-score method
subsampling()
Subsampling inference (Politis, Romano & Wolf)
subscale_ea_ave() subscale_ea_composite_rel() subscale_ee_ave() subscale_ee_composite_rel() subscale_er_ave() subscale_er_composite_rel() subscale_ua_ave() subscale_ua_composite_rel()
Subscale average variance extracted and composite reliability
substance_categories
Substance Categories
summary(<morie_cluster>)
Summarise method for morie_cluster objects
summary(<morie_gam>)
Summary of a native generalized additive model
summary(<morie_lm>)
Summarise method for morie_lm objects
summary(<morie_lmm>)
Summarise a morie mixed model
summary(<morie_ml_fit>)
Summarise method for morie_ml_fit objects
summary_statistics_table()
Descriptive statistics for a set of variables
swdist() swknn() swgab() swtri() swinv() swkern() swadapt() swblk() swsph() swlag() swlag2() swlagf() swpower() swspars() swpath()
Spatial weights: builders, lags and graph operations
synthetic_abc()
Synthetic-likelihood ABC, Meeds & Welling Algorithm 1
synthetic_log_likelihood()
Synthetic log-likelihood
systematic_resample()
Systematic resampling
table1()
Table 1 (baseline characteristics) stratified by group
tables_pub
Publication-ready table generation
tagRC_adapted_pagerank()
tagRC_adapted_pagerank
tagRC_cheatsheet()
tagRC_cheatsheet
tagRC_preference_vector()
tagRC_preference_vector
tagRC_tripartite_graph()
tagRC_tripartite_graph
taphonomy
Taphonomic preservation as a causal-inference problem
temporal_validate()
Train on earlier data, test on later data
tippett_combined()
Tippett's minimum-p method
tipping_point_analysis()
Tipping-point analysis for missing-data sensitivity
tox
Forensic toxicology: matrix-aware quantitation and antemortem inference
tps_crime
Cross-category crime analyses for Toronto Police Service (TPS) datasets
tps_csi
Statistics Canada Crime Severity Index (CSI) weights for TPS data
tps_spatial
Spatial analyses for TPS crime data
tps_spatial_advanced
Heavyweight spatial statistics for TPS data
train_bpe()
Train a BPE model: merge the most frequent adjacent pair greedily
treatment_effect_table()
Summary table of causal effect estimates from multiple estimators
trend_matrix()
Design columns for k, m and each delta_j
two_proportion_ztest()
Two-sample z-test for the difference in proportions
two_sample_ttest()
Independent two-sample t-test (equal or unequal variance)
two_way_anova()
Two-way factorial ANOVA (Type-II SS)
unescape_whitespace()
Invert the whitespace escape
unwrap_dek()
Unwrap a DEK, optionally logging the call
utility()
Utility = efficacy per person-day in quarantine (eq. 4)
validate_schema()
Validate a data frame against a list of column rules
validation
Data and model validation framework
morie_datasets_vancouver_graffiti() morie_datasets_vancouver_noise_control_areas() morie_datasets_vancouver_homeless_shelters() morie_datasets_vancouver_property_use_inspection_districts() morie_datasets_vancouver_fire_halls() morie_datasets_vancouver_community_centres() morie_datasets_vancouver_community_food_markets() morie_datasets_vancouver_disability_parking() morie_datasets_vancouver_public_art()
Included Vancouver Open Data crime-adjacent civic datasets
vargha_delaney_a()
Vargha-Delaney A statistic
variable_taxonomy
Per-variable taxonomy + dispatcher (R mirror of morie.variable_taxonomy)
variance_equality_suite()
Run a suite of homogeneity-of-variance tests
variance_ratio()
Variance ratio (F-test for equality of variances)
vcov(<morie_lm>)
Extract the covariance matrix of method for morie_lm objects
vcov(<morie_lmm>)
Covariance of the fixed-effect estimates
verify_chain()
Verify a chain, returning the FIRST bad index (not just a boolean)
verify_inclusion()
Recompute the root from a leaf and an audit path
vgdrift()
Expected Matheron semivariogram under a linear drift
viterbi_segment()
Unigram LM segmentation by Viterbi over the split lattice
vol_engle_lagrange() vol_corradi_swan_persistence()
Volatility diagnostics: ARCH-LM and multi-horizon distributional accuracy
wald_test()
Wald test for linear restrictions on parameters
welch()
Welch power spectral density
welch_ttest()
Welch's t-test (convenience wrapper)
wilcoxon_signed_rank()
Wilcoxon signed-rank test (one-sample or paired)
wild_bootstrap()
Wild bootstrap for linear regression with heteroskedasticity
wrap_angle()
Wrap to [-pi, pi)
wrap_dek()
Wrap a DEK under a KEK
zegcnt()
Marginal moments of Zeger's parameter-driven count model