SpecModel-class: S4 classes to specify a model.

SpecModel-classR Documentation

S4 classes to specify a model.

Description

Classes describing all the parts of a model that can be specified wihout knowing the exact structure of, and, possibly variation in, the data.

Details

The specification might, for instance, contain a list of main effects and interactions to be included in a hierarchical model, but not the priors for themain effects and interactions, which depend on the length and dimtype of the dimensions. These are not known until the relevant data, such as outcome variable y, are supplied, which occurs in the call to function estimateModel, estimateCounts, or estimateAccount.

Slots

call

The original call to function Model.

nameY

The name of the outcome variable, which, in models for the data, may be the name of a dataset.

series

The name of the demographic series being modelled. Used only when dealing with demographic accounts.

varsigma

Data-level standard deviation, when this is supplied by the user (and treated as known.)

nuVarsigma

Degrees of freedom for truncated half-t prior for data-level standard deviation.

AVarsigma

Scale for truncated half-t prior for data-level standard deviation.

varsigmaMax

Maximum value for data-level standard deviation.

prob

In a Poisson-binomial model, the probability that a person or event is enumerated and is placed in the correct cell.

lower

Lower limit for the data-level rate, probability, or mean parameter.

upper

Upper limit for the data-level rate, probability, or mean parameter.

tolerance

Small quantity added to lower or subtracted from upper when testing whether a proposed value for a data-level rate, probability, or mean is within the required bounds.

maxAttempt

Maximum number of attempts at generating a proposal for a data-level rate, probability or mean before giving up and retaining the current value, within one iteration of the Gibbs sampler.

scaleTheta

The standard deviation of the proposal density for Metropolis-Hastings updates of the data-level rate, probability, or mean parameter.

formulaMu

A formula describing the main effects and interactions in a hierarchical model.

specsPriors

A list of object of class SpecPrior, describing any non-default priors for main effects and interactions.

nameSpecPriors

The names of the main effects or interactions that have non-default priors.

nu

Degrees of freedom for TFixed model.

nuSigma

Degrees of freedom for truncated half-t prior for standard deviation in prior (level 2) model.

ASigma

Scale for truncated half-t prior for standard deviation in prior (level 2) model.

sigmaMax

Maximum value for standard deviation in prior (level 2) model.

aggregate

An object of class SpecAggregate.

mean

Vector of means in NormalFixed or TFixed model - subsetted to include only cells that are observed in y.

meanAll

Vector of means in NormalFixed or TFixed model, before subsetting.

sd

Vector of standard deviations or scales in NormalFixed or TFixed model - subsetted to include only cells that are observed in y

sdAll

Vector of standard deviations or scales in NormalFixed model, or TFixed model before subsetting.

metadata

Metadata for mean and sd.

metadataAll

Metadata for meanAll and sdAll.

useExpose

Whether the model includes and exposure term.

Warning

In normal usage, it should not be necessary to access, or even know about, the slots of a SpecModel object. The slots are not part of the API of the package, and may change in future.

See Also

Object of class SpecModel are created by a call to function Model.


StatisticsNZ/demest documentation built on Nov. 2, 2023, 7:56 p.m.