Description Usage Arguments Examples
This function will plot the effects of increasing and decreasing one or several latent variables by the specified standard deviation.
1 2 |
plsr_obj |
A plsr object |
lv_num |
An integer or list of integer specifying which latent variables to plot. |
sd |
Range in standard deviations from +[sd] to -[sd]. |
FUN |
A vector containing two functions, which will be used for plotting the results of
changes in the latent variable(s) in X and Y. Default is |
args1 |
Arguments for the plotting function in |
args2 |
Arguments for the plotting function in |
1 2 3 4 5 6 7 8 9 10 11 12 | plsr_obj = pls(rating_data, tracking_data,10,10)
#plot latent variable effect with barplots (default) for X and Y side
plot_latent_variables(plsr_obj)
#plot latent variables with barplots for the X side and
#a custom plot function tailored to face tracking data for the Y side
plot_latent_variables(plsr_obj,lv=1:2, sd=2, FUN=c(barplot,plsr:::plot_frame))
#same as above but with additional arguments passed to the plotting functions
plot_latent_variables(plsr_obj,FUN = c(barplot,plsr:::plot_frame),
args1=list(col="red"),args2 = list(single_frame=5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.