Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(plssem)
This vignette shows examples of multilevel random slopes and intercept models, with both continuous and ordinal data.
slopes_model <- " X =~ x1 + x2 + x3 Z =~ z1 + z2 + z3 Y =~ y1 + y2 + y3 W =~ w1 + w2 + w3 Y ~ X + Z + (1 + X + Z | cluster) W ~ X + Z + (1 + X + Z | cluster) "
fit_slopes_cont <- pls( slopes_model, data = randomSlopes, bootstrap = TRUE, sample = 50 ) summary(fit_slopes_cont)
fit_slopes_ord <- pls( slopes_model, data = randomSlopesOrdered, bootstrap = TRUE, sample = 50, ordered = colnames(randomSlopesOrdered) # explicitly specify variables as ordered ) summary(fit_slopes_ord)
intercepts_model <- ' f =~ y1 + y2 + y3 f ~ x1 + x2 + x3 + w1 + w2 + (1 | cluster) '
fit_intercepts_cont <- pls( intercepts_model, data = randomIntercepts, bootstrap = TRUE, sample = 50 ) summary(fit_intercepts_cont)
fit_intercepts_ord <- pls( intercepts_model, data = randomInterceptsOrdered, bootstrap = TRUE, sample = 50, ordered = colnames(randomInterceptsOrdered) # explicitly specify variables as ordered ) summary(fit_intercepts_ord)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.