Join us for
RADAR: AI Edition

gss (version 2.2-9)

mkrk.nominal: Crafting Building Blocks for Discrete Splines

Description

Craft numerical functions to be used by mkterm to assemble model terms involving factors.

Usage

mkrk.nominal(levels)
mkrk.ordinal(levels)

Value

A list of two elements.

fun

Function definition.

env

Portable local constants derived from the arguments.

Arguments

levels

Levels of the factor.

Details

For a nominal factor with levels 1,2,,k, the level means f(i) will be shrunk towards each other through a penalty proportional to (f(1)f(.))2++(f(k)f(.))2 where f(.)=(f(1)++f(k))/k.

For a ordinal factor with levels 1<2<<k, the level means f(i) will be shrunk towards each other through a penalty proportional to (f(1)f(2))2++(f(k1)f(k))2

See Also

mkterm, mkrk.cubic, and mkrk.tp.