mkrk.nominal {gss} | R Documentation |
Craft numerical functions to be used by mkterm
to assemble
model terms involving factors.
mkrk.nominal(levels) mkrk.ordinal(levels)
levels |
Levels of the factor. |
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(k-1)-f(k))^2
A list of two components.
fun |
Function definition. |
env |
Portable local constants derived from the arguments. |
mkrk.x
create a bivariate function
fun(x,y,env,outer=FALSE)
, where x
, y
are real
arguments and local constants can be passed in through env
.
Chong Gu, chong@stat.purdue.edu
mkterm
, mkrk.cubic
, and
mkrk.tp
.