ctrl.multord: Control Function for multord

Description Usage Arguments Author(s) See Also Examples

Description

Control function for multord, a model for multivariate ordinal responses response styles

Usage

1
2
3
ctrl.multord(RS = TRUE, thresholds.acat = c("full", "shift",
  "minimal"), XforRS = TRUE, opt.method = c("L-BFGS-B", "nlminb"),
  Q = 10, cores = 5, lambda = 0.01)

Arguments

RS

Logical value indicating whether response style should be modelled.

thresholds.acat

Type of parametrization used for thresholds: thresholds = "full" implies separate estimates of threshold values for each response variable; thresholds = "shift" implies equal threshold parameter across all response variables modified by shift parameters for each response variable; thresholds = "minimal" implies equal threshold parameter across all response variables. This option only applies for adjacent categories models (model = "acat" and is not implemented for cumulative models.)

XforRS

Logical value indicating whether also covariate effects on the response style should be considered. Only relevant if RS = TRUE.

opt.method

Specifies optimization algorithm used by optim, either L-BFGS-B or nlminb.

Q

Number of nodes to be used (per dimension) in Gauss-Hermite-Quadrature. If RS = TRUE, Gauss-Hermite-Quadrature is two-dimensional.

cores

Number of cores to be used in parallelized computation.

lambda

Tuning parameter for internal ridge penalty. It is supposed to be set to a small value to stabilize estimates.

Author(s)

Gunther Schauberger
gunther.schauberger@tum.de
https://www.researchgate.net/profile/Gunther_Schauberger2

See Also

multord MultOrd-package plot.MultOrd

Examples

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
## Not run: 
data(tenseness)

## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]

## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)

## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))



####
## Adjacent Categories Models
####

## Multivariate adjacent categories model, without response style, without explanatory variables
m.tense0 <- multord(f.tense0, data = tenseness, control = ctrl.multord(RS = FALSE))
m.tense0

## Multivariate adjacent categories model, with response style as a random effect, without explanatory variables
m.tense1 <- multord(f.tense0, data = tenseness)
m.tense1

## Multivariate adjacent categories model, with response style as a random effect, 
## without explanatory variables for response style BUT for location
m.tense2 <- multord(f.tense1, data = tenseness, control = ctrl.multord(XforRS = FALSE))
m.tense2

## Multivariate adjacent categories model, with response style as a random effect, with explanatory variables for location AND response style
m.tense3 <- multord(f.tense1, data = tenseness)
m.tense3

plot(m.tense3)



####
## Cumulative Models
####

## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multord(f.tense0, data = tenseness, control = ctrl.multord(RS = FALSE), model = "cumulative")
m.tense0.cumul

## Multivariate cumulative model, with response style as a random effect, without explanatory variables
m.tense1.cumul <- multord(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul

## Multivariate cumulative model, with response style as a random effect, 
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multord(f.tense1, data = tenseness, control = ctrl.multord(XforRS = FALSE), model = "cumulative")
m.tense2.cumul

## Multivariate cumulative model, with response style as a random effect, with explanatory variables for location AND response style
m.tense3.cumul <- multord(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul

plot(m.tense3.cumul)

## End(Not run)

Schaubert/MultOrd documentation built on June 13, 2019, 7:09 p.m.