Learn R Programming

rethinking (version 1.47)

link: Intermediate predictions for map and map2stan models

Description

Computes inverse-link linear model values for map and map2stan samples.

Usage

link( fit , data , n=1000 , probs=NULL , refresh=0.1 , ... )

Arguments

fit

Object of class map or map2stan

data

Optional list of data to compute predictions over

n

Number of samples to use

probs

Not yet implemented

refresh

Refresh interval for progress display. Set to refresh=0 to suppress display.

...

Other parameters to pass to someone

Value

Details

This function computes the value of each linear model at each sample for each case in the data. Inverse link functions are applied, so that for example a logit link linear model produces probabilities, using the logistic.

This function is used internally by WAIC. It's still a work in progress. Most notably, it doesn't work quite right for ordered logistic models.

The rethinking package defines a generic function link, so methods can be defined for other model fit classes. I might eventually build methods for lm and glm.

See Also

map,map2stan