biogeme.latent_variables.model_spec module¶
- class biogeme.latent_variables.model_spec.IndicatorMeasurementSpec(indicator_name, measurement_model, measurement_sigma=None)[source]¶
Bases:
objectMeasurement specification attached to one indicator.
This object describes how one semantic indicator is modeled in a given run, independently of the indicator definition itself.
- Parameters:
indicator_name (
str) – Name of the indicator being modeled.measurement_model (
MeasurementModel) – Statistical measurement model used for that indicator.measurement_sigma (
PositiveParameterSpec|None) – Optional specification of the measurement scale on its natural scale.
- indicator_name: str¶
- measurement_model: MeasurementModel¶
- measurement_sigma: PositiveParameterSpec | None¶
- class biogeme.latent_variables.model_spec.LatentVariable(name, structural_equation, indicators, structural_sigma=None)[source]¶
Bases:
objectPure latent-variable specification.
- Parameters:
name (
str) – Latent variable name.structural_equation (
StructuralEquation) – Structural equation specification.indicators (
Iterable[str]) – Names of indicators linked to this latent variable.structural_sigma (
PositiveParameterSpec|None) – Optional specification of the structural standard deviation on its natural scale.
- indicators: Iterable[str]¶
- name: str¶
- structural_equation: StructuralEquation¶
- structural_sigma: PositiveParameterSpec | None¶
- class biogeme.latent_variables.model_spec.LikertIndicator(name, statement, type_name)[source]¶
Bases:
objectPure semantic indicator specification.
- Parameters:
name (
str) – Indicator name.statement (
str) – Human-readable text of the indicator.type_name (
str) – Shared type metadata name.
- name: str¶
- statement: str¶
- type_name: str¶
- class biogeme.latent_variables.model_spec.LikertType(type_name, symmetric, categories, neutral_labels)[source]¶
Bases:
objectShared indicator-type metadata.
- Parameters:
type_name (
str) – Type name.symmetric (
bool) – Whether the threshold system is symmetric when used by ordinal indicators.categories (
list[int]) – Ordered category labels.neutral_labels (
list[int]) – Neutral or placeholder labels.
- categories: list[int]¶
- neutral_labels: list[int]¶
- symmetric: bool¶
- type_name: str¶
- class biogeme.latent_variables.model_spec.MeasurementConfiguration(specifications)[source]¶
Bases:
objectCollection of indicator-level measurement specifications.
- Parameters:
specifications (
Iterable[IndicatorMeasurementSpec]) – Measurement specification for each modeled indicator.
- specifications: Iterable[IndicatorMeasurementSpec]¶
- class biogeme.latent_variables.model_spec.MeasurementModel(*values)[source]¶
Bases:
str,EnumMeasurement model used for one indicator.
- GAUSSIAN = 'gaussian'¶
- ORDERED_LOGIT = 'ordered_logit'¶
- ORDERED_PROBIT = 'ordered_probit'¶
- class biogeme.latent_variables.model_spec.PositiveParameterSpec(start=None, lower_bound=0.0)[source]¶
Bases:
objectSpecification of a strictly positive model parameter.
The value is expressed on the natural scale of the parameter. Downstream generators may transform it internally, for example by using
logfor a positive reparameterization.- Parameters:
start (
float|None) – Optional starting value on the natural scale.lower_bound (
float|None) – Optional lower bound on the natural scale.
- lower_bound: float | None¶
- start: float | None¶
- class biogeme.latent_variables.model_spec.StructuralEquation(name, intercept=True, explanatory_variables=())[source]¶
Bases:
objectPure structural-equation specification.
- Parameters:
name (
str) – Name of the owning latent variable.intercept (
bool) – Whether a structural intercept should be included.explanatory_variables (
Iterable[str]) – Variables entering the deterministic part.
- explanatory_variables: Iterable[str]¶
- intercept: bool¶
- name: str¶