## theoretical grid restrictions (rectangles; keep covariate ties tied)
fit.rect1 <- mds(rectangles, type = "ordinal", init = rect_constr)
fit.rect2 <- smacofConstraint(rectangles, type = "ordinal", ties = "secondary",
constraint = "diagonal", init = fit.rect1$conf,
external = rect_constr, constraint.type = "ordinal")
plot(fit.rect2)
## regional restrictions morse code data (signal length, strength)
fitMorse1 <- mds(morse, type = "ordinal")
fitMorse1
fitMorse2 <- smacofConstraint(morse, type = "ordinal", constraint = "unrestricted",
external = morsescales[,2:3],
constraint.type = "ordinal",
init = fitMorse1$conf)
fitMorse2
plot(fitMorse2)
## facial expression data I (axial restriction, C diagonal)
Delta <- FaceExp
attr(Delta, "Labels") <- NULL
fitFace <- mds(Delta, type = "ordinal") ## starting solution
Z <- FaceScale[, c(1,3)] ## external variables
fitFaceC1 <- smacofConstraint(Delta, type = "ordinal",
constraint = "diagonal", external = Z, constraint.type = "ordinal",
init = fitFace$conf)
fitFaceC1$C
plot(fitFaceC1, xlab = "Pleasant-Unpleasant", ylab = "Tension-Sleep",
main = "Face Expression (Diagonal Restriction)")
## facial expression data II (C unrestricted)
fitFaceC3 <- smacofConstraint(Delta, type = "ordinal",
constraint = "unrestricted", external = Z, constraint.type = "ordinal",
init = fitFace$conf)
fitFaceC3$C
plot(fitFaceC3, main = "Face Expression (C Unrestricted, Ordinal Transformation)")
Run the code above in your browser using DataLab