This function is the main funtion of the package and can be used to estimate average and conditional effects of a treatment variable on an outcome variable, taking into account any number of continuous and categorical covariates. It automatically generates lavaan syntax for a multi-group structural equation model, runs the model using lavaan, and extracts various average and conditional effects of interest.
Tries to determine the format of the data by the file ending and chooses the appropriate function to read data. Currently supports .csv, .dat, .txt, .sav, and .xpt and calls read.csv, read.table, read.spss, read.xport accordingly. The default values for arguments depend on the function used to read data.
Can be used to make a conditional effects plot with an effect function on the y axis and a covariate on the x axis. ggplot2 is used to create the plot.
This function automatically generates lavaan syntax for the measurement model for a call to effectLite. It is currently also used in the shiny interface.