/** * Opinion Dynamics * * Models how public opinion and party support shift over time * * Research Foundation: * - Erikson et al. (2002): The Macro Polity - public opinion dynamics * - Powell & Whitten (1993): Economic voting in post-communist states * - Lewis-Beck & Stegmaier (2000): Economic determinants of electoral outcomes * * Key Findings: * - Economic performance drives 30-50% of vote swing * - Scandals: -5 to -15% support * - Policy successes: +3 to +8% support * - Crises: Major realignment (-20% to +20% for opposition) * * @module elections/OpinionDynamics */ import { VoteShares } from './VotingSystem.js'; /** * Event that affects public opinion */ export interface OpinionEvent { /** Event type */ type: OpinionEventType; /** Severity (0-1) */ severity: number; /** Which party/coalition is responsible? */ responsibleParty?: string; /** Which policy domain is affected? */ policyDomain?: string; } /** * Opinion event types */ export declare enum OpinionEventType { /** Economic crisis (recession, unemployment) */ ECONOMIC_CRISIS = "ECONOMIC_CRISIS", /** Economic boom (growth, prosperity) */ ECONOMIC_BOOM = "ECONOMIC_BOOM", /** Political scandal */ SCANDAL = "SCANDAL", /** Major policy success */ POLICY_SUCCESS = "POLICY_SUCCESS", /** Major policy failure */ POLICY_FAILURE = "POLICY_FAILURE", /** AI catastrophe or disaster */ AI_CATASTROPHE = "AI_CATASTROPHE", /** Environmental crisis */ ENVIRONMENTAL_CRISIS = "ENVIRONMENTAL_CRISIS", /** International crisis */ INTERNATIONAL_CRISIS = "INTERNATIONAL_CRISIS", /** Social unrest */ SOCIAL_UNREST = "SOCIAL_UNREST" } /** * Update vote shares based on opinion event * * @param currentShares - Current vote/support shares * @param event - Opinion event * @param incumbentPartyId - Which party is in government * @param oppositionPartyIds - Opposition parties * @returns Updated vote shares */ export declare function updateOpinionFromEvent(currentShares: VoteShares, event: OpinionEvent, incumbentPartyId: string, oppositionPartyIds: string[]): VoteShares; /** * Apply gradual opinion drift (month-to-month random walk) * * Research: Opinion fluctuates ±1-2% per month randomly */ export declare function applyOpinionDrift(currentShares: VoteShares, rng?: () => number): VoteShares; /** * Calculate incumbent approval rating * * Based on current vote share and recent events */ export declare function calculateApprovalRating(incumbentVoteShare: number, recentEvents: OpinionEvent[]): number;