Description Usage Arguments Details Value Examples
This function calculates predicted conditional means and their corresponding standard errors for objects of class weightfunct.
an object of class weightfunct
a vector or matrix specifying the values of the moderator variables for which predicted values should be calculated; defaults to
predict(object) 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
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.
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.
The function returns a list containing the following components:
values section simply prints the
values matrix for verification. The
adjusted sections print the conditional means for each row of new data, unadjusted and adjusted for publication bias (respectively), and their standard errors.
1 2 3 4 5 6
## Not run: test <- weightfunct(effect, v, mods=~x1 + x2 + x3, steps) values <- matrix(c(0,1,0),ncol=3) # An arbitrary set of 3 dummy-coded moderators predict(test, values) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.