predict(x)
requires that the user specify a vector or matrix of predictor values. Without specifying values, the function will not work.
For models including y
number of moderator variables, users should set values
equal to a k
x y
matrix, where k
is the number of rows of data (i.e., "new" studies). In the example code, for example, there are 3 moderator variables and one row of data, so values
is a 1 x 3 matrix. The intercept is incldued by default.
Note that weightfunct
handles categorical moderators automatically. To include them here, the appropriate contrast (dummy) variables must be explicitly specified. The contrasts
function can help to understand the contrast matrix for a given factor.