SSM Results¶
circumplex.ssm
¶
Structural Summary Method (SSM) analysis results and configuration classes.
This module provides dataclasses for representing SSM analysis results:
SSMDetails: Configuration and parameters used in SSM analysisSSM: Complete SSM analysis results with estimates and confidence intervals
| CLASS | DESCRIPTION |
|---|---|
SSMDetails |
Details of SSM analysis configuration and parameters. |
SSM |
Results from a Structural Summary Method (SSM) analysis. |
SSMDetails
dataclass
¶
SSMDetails(boots: int, interval: float, listwise: bool, angles: list[float], contrast: bool, score_type: str)
Details of SSM analysis configuration and parameters.
| ATTRIBUTE | DESCRIPTION |
|---|---|
boots |
Number of bootstrap resamples used for confidence intervals.
TYPE:
|
interval |
Confidence interval level (e.g., 0.95 for 95% CI).
TYPE:
|
listwise |
Whether listwise deletion was used for missing data.
TYPE:
|
angles |
Angular displacements of the circumplex scales in degrees. |
contrast |
Whether the analysis involves contrasts between groups.
TYPE:
|
score_type |
Type of scores used in analysis (
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
from_dict |
Create SSMDetails instance from dictionary. |
to_dict |
Convert SSMDetails instance to dictionary. |
__rich_repr__ |
Generate rich console representation of SSM analysis details. |
from_dict
classmethod
¶
Create SSMDetails instance from dictionary.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
Dictionary containing SSM analysis parameters with keys: boots, interval, listwise, angles, contrast, score_type.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
SSMDetails
|
New SSMDetails instance populated from dictionary data. |
Source code in src/circumplex/ssm.py
to_dict
¶
__rich_repr__
¶
Generate rich console representation of SSM analysis details.
Source code in src/circumplex/ssm.py
SSM
dataclass
¶
Results from a Structural Summary Method (SSM) analysis.
| ATTRIBUTE | DESCRIPTION |
|---|---|
results |
DataFrame containing SSM parameter estimates and confidence intervals.
TYPE:
|
scores |
DataFrame containing the circumplex scale scores used in the analysis.
TYPE:
|
details |
Configuration and parameters used in the SSM analysis.
TYPE:
|
type |
Type of SSM analysis performed (e.g.,
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
from_dict |
Create SSM instance from dictionary. |
to_dict |
Convert SSM instance to dictionary. |
summary |
Print a formatted summary of SSM analysis results. |
plot_circle |
Generate a circular SSM plot for the analysis results. |
plot_curve |
Generate SSM curve plots for the analysis results. |
plot_contrast |
Generate SSM parameter contrast plots for the analysis results. |
from_dict
classmethod
¶
Create SSM instance from dictionary.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
Dictionary containing SSM analysis results with keys: results, scores, details, type.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
SSM
|
New SSM instance populated from dictionary data. |
Source code in src/circumplex/ssm.py
to_dict
¶
summary
¶
Print a formatted summary of SSM analysis results.
| PARAMETER | DESCRIPTION |
|---|---|
rich_print
|
Whether to use rich console formatting for output, by default True. If False or rich is not installed, falls back to standard printing.
TYPE:
|
Source code in src/circumplex/ssm.py
plot_circle
¶
Generate a circular SSM plot for the analysis results.
Convenience method that passes SSM data to the plot_circle() function. Automatically plots all profiles in the results.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Additional plotting options passed to plot_circle(). See plot_circle() documentation for available options (e.g., amax, angle_labels, colors, fontsize, drop_lowfit, figsize, title).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure
|
Matplotlib Figure object. |
Examples:
>>> results = ssm_analyze(data, scales=list(range(8)))
>>> fig = results.plot_circle()
>>> fig.savefig('profile.png')
See Also
plot_circle :
Full function documentation
Source code in src/circumplex/ssm.py
plot_curve
¶
Generate SSM curve plots for the analysis results.
Convenience method that passes SSM data to the plot_curve() function. Creates faceted plots showing fitted curves overlaid on observed scores.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Additional plotting options passed to plot_curve(). See plot_curve() documentation for available options (e.g., angle_labels, colors, base_size, drop_lowfit, figsize).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure
|
Matplotlib Figure object. |
Examples:
>>> results = ssm_analyze(data, scales=list(range(8)))
>>> fig = results.plot_curve()
>>> fig.savefig('curves.png')
See Also
plot_curve :
Full function documentation
Source code in src/circumplex/ssm.py
plot_contrast
¶
Generate SSM parameter contrast plots for the analysis results.
Convenience method that passes SSM data to the plot_contrast() function. Only available for contrast analyses (when contrast=True in ssm_analyze).
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Additional plotting options passed to plot_contrast(). See plot_contrast() documentation for available options (e.g., drop_xy, sig_color, ns_color, linewidth, fontsize, figsize).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure
|
Matplotlib Figure object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If this SSM object does not contain contrast results. |
Examples:
>>> results = ssm_analyze(data, scales=list(range(8)),
... grouping='condition', contrast=True)
>>> fig = results.plot_contrast()
>>> fig.savefig('contrasts.png')
See Also
plot_contrast :
Full function documentation