fitted.px: Calculates fitted values for p(x) from model.

View source: R/derviedfuns.R

fitted.pxR Documentation

Calculates fitted values for p(x) from model.

Description

Calculates fitted values, p(x) for given observations, from model (optionally at given x-value).

Usage

## S3 method for class 'px'
fitted(hmmlt, obs = 1:dim(hmmlt$xy)[1], at.x = NULL)

Arguments

hmmlt

output from fit.hmltm

obs

observations (row numbers of hmmlt$xy) for which to calculate esw

at.x

values at which to evaluate p(x) - see below.

Details

If hmmlt$models is NULL and

at.x is NULL

returns vector of values of p(x=hmmlt$xy$x[obs]) if obs given, or vector of values of p(x=hmmlt$xy$x) if obs not given;

at.x is specified

returns vector of values of p(x=at.x).

If hmmlt$models is not NULL and

at.x is NULL

returns vector of values of p_obs[i](x=hmmlt$xy$x[j]) if obs given, or vector of values of p_i(x=hmmlt$xy$x[j]) for all i if obs not given;

at.x is specified

as when at.x is NULL, but with x=at.x instead of hmmlt$xy$x.


david-borchers/hmltm documentation built on Oct. 29, 2023, 9:07 p.m.