Analysis¶
Statistical analysis modules for comprehensive data insights.
Univariate Analysis¶
Single variable descriptive statistics and distribution analysis.
Univariate statistical analysis.
Performs descriptive statistics for single variables including: - Numeric: mean, median, std, robust statistics, distribution tests - Categorical: frequencies, mode, diversity measures - Missing: missingness analysis
Bivariate Analysis¶
Two-variable relationship analysis including correlations and group comparisons.
Bivariate statistical analysis.
Analyzes relationships between pairs of variables: - Numeric x Numeric: Pearson/Spearman correlation, regression - Categorical x Categorical: Chi-square, Cramér’s V - Categorical x Numeric: Group comparisons, ANOVA
- class statqa.analysis.bivariate.BivariateAnalyzer(significance_level=0.05, min_sample_size=10, use_robust=True)[source]¶
Bases:
objectAnalyzer for two-variable relationships.
Temporal Analysis¶
Time series analysis with trend detection and change point analysis.
Temporal analysis for time series data.
Analyzes trends and patterns over time: - Trend detection (Mann-Kendall, linear regression) - Seasonal decomposition - Change point detection - Year-over-year changes
- class statqa.analysis.temporal.TemporalAnalyzer(significance_level=0.05, min_periods=3)[source]¶
Bases:
objectAnalyzer for temporal patterns and trends.
- analyze_grouped_trend(data, time_var, value_var, group_var)[source]¶
Analyze trends separately for different groups.
- detect_change_points(data, time_var, value_var)[source]¶
Detect significant change points in time series.
Uses simple segmentation approach comparing before/after means.
Causal Analysis¶
Causal inference with confounding control and sensitivity analysis.
Causal analysis with confounding control.
Performs regression analysis with control variables to surface associations in causal language: - Linear regression with controls - Logistic regression for binary outcomes - Confounder identification - Sensitivity analysis
- class statqa.analysis.causal.CausalAnalyzer(significance_level=0.05, min_sample_size=30, robust_se=True)[source]¶
Bases:
objectAnalyzer for causal relationships with confounding control.
Note: These are observational analyses and do not establish true causation without strong assumptions. Results should be interpreted as associations controlling for measured confounders.
- analyze_treatment_effect(data, treatment_var, outcome_var, control_vars=None)[source]¶
Estimate treatment effect on outcome with optional controls.
- Parameters:
- Returns:
Treatment effect analysis results as dictionary
- Return type:
- identify_confounders(data, treatment_var, outcome_var, potential_confounders)[source]¶
Identify which variables act as confounders.
A confounder must: 1. Be associated with treatment 2. Be associated with outcome 3. Not be on causal path between treatment and outcome
- Parameters:
- Returns:
Confounder identification results as dictionary
- Return type: