contribution-analysis

Quantify factor contributions to response variable variance via R² decomposition.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill contribution-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contribution-analysis
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/lake-warming-attribution/environment/skills/contribution-analysis
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill contribution-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contribution analysis quantifies how much each factor contributes to explaining the variance of a response variable using the R² decomposition method. This skill enables precise attribution of predictive power to individual variables or factor groups, improving model interpretation and decision-making.

Core Features & Use Cases

  • Global PCA-based factor scores: Combine variables, standardize, and derive factor scores for downstream contribution analysis.
  • R²-based attribution: Compute each factor's share of explained variance via R² decomposition.
  • Use Case: Data scientists can compare the influence of different feature groups on a target outcome to guide feature engineering and model selection.

Quick Start

Run a complete contribution analysis by fitting a global PCA across all variables, obtaining factor scores, and calculating each factor's contribution to the total R².

Frequently Asked Questions about contribution-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I quantify factor contributions to a response variable's variance?

You calculate factor contributions using R² decomposition, which attributes the explained variance of a response variable to individual factors. The process applies global PCA to derive factor scores and computes each group's share of predictive power.

What is R² decomposition in data analytics?

R² decomposition is a statistical method that breaks down the explained variance of a response variable to attribute predictive power to individual correlated factors. It quantifies how much each feature group contributes to a target outcome.

How do I use PCA to attribute explained variance to correlated variables?

Standardize your dataset and fit a global PCA across all variables to extract factor scores. These scores are then used in R² decomposition calculations to attribute explained variance to specific factor groups.

Can I analyze feature group influence on a target outcome without manual PCA setup?

Yes, this workflow automates data standardization, global PCA fitting, factor score extraction, and R² contribution calculations. It directly outputs a structured result comparing the influence of different feature groups on a target outcome.

When should I use R² decomposition instead of standard factor analysis?

Use R² decomposition when you need to quantify the exact contribution of correlated variables to a response variable's variance. Standard factor analysis identifies latent structures, while R² decomposition directly attributes predictive power for model selection.

What are the limitations of using PCA for contribution analysis?

PCA-based contribution analysis requires data standardization and works best with multiple correlated variables. It attributes explained variance globally, so it may not capture non-linear relationships or interactions outside the principal component structure.