Selection and/or smoothing of ordinally scaled independent variables using a group lasso or generalized ridge penalty.

Package: | ordPens |

Type: | Package |

Version: | 0.3-1 |

Date: | 2015-05-21 |

Depends: | grplasso, mgcv, RLRsim, tcltk |

Suggests: | IsoGene, Biobase |

License: | GPL-2 |

LazyLoad: | yes |

Smoothing and selection of ordinal predictors is done by the function
`ordSelect`

; smoothing only, by `ordSmooth`

. For
ANOVA with ordinal factors, use `ordAOV`

.

Jan Gertheiss

Maintainer: Jan Gertheiss, jgerthe@uni-goettingen.de

Gertheiss, J. (2014). *ANOVA for factors with ordered levels*, Journal of
Agricultural, Biological and Environmental Statistics, 19, 258-277.

Gertheiss, J., S. Hogger, C. Oberhauser and G. Tutz (2011). *Selection
of ordinally scaled independent variables with applications to international
classification of functioning core sets*.
Journal of the Royal Statistical Society C (Applied Statistics), 60, 377-395.

Gertheiss, J. and F. Oehrlein (2011). *Testing relevance and linearity of
ordinal predictors*, Electronic Journal of Statistics, 5, 1935-1959.

Gertheiss, J. and G. Tutz (2009). *Penalized regression with ordinal
predictors*. International Statistical Review, 77, 345-365.

`ordSelect`

, `ordSmooth`

,
`ordAOV`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ```
# smooth modeling of a random dataset
set.seed(123)
# generate (ordinal) predictors
x1 <- sample(1:8,100,replace=TRUE)
x2 <- sample(1:6,100,replace=TRUE)
x3 <- sample(1:7,100,replace=TRUE)
# the response
y <- -1 + log(x1) + sin(3*(x2-1)/pi) + rnorm(100)
# x matrix
x <- cbind(x1,x2,x3)
# lambda values
lambda <- c(1000,500,200,100,50,30,20,10,1)
# smooth modeling
o1 <- ordSmooth(x = x, y = y, lambda = lambda)
# results
round(o1$coef,digits=3)
plot(o1)
# If for a certain plot the x-axis should be annotated in a different way,
# this can (for example) be done as follows:
plot(o1, whichx = 1, xlim = c(0,9), xaxt = "n")
axis(side = 1, at = c(1,8), labels = c("no agreement","total agreement"))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.