Prepare data for metaSEM
tssem1 function in metaSEM package uses a list data, which includes a “son” list of covariance matrix and a vector of sample size (maybe also another vector of cluster). This data format differs a lot from the wide format we used usually. In the wide format data, one row includes information for one study, hence I arrange the correlations in a matrix (usually one matrix for one study) from top to down and from left to right successively in a row.
Three Types of SS in R
To learn the following topic, you are supposed to have a good knowledge of regression and moderation analysis. If not, you may have difficulties in understanding what I am talking about. Firstly, see type-1 SS, which is the default of R. Fit a regression:
library(car) data(package = "carData") data(Ginzberg) head(Ginzberg) ## simplicity fatalism depression adjsimp adjfatal adjdep ## 1 0.92983 0.35589 0.59870 0.75934 0.10673 0.41865 ## 2 0.91097 1.18439 0.