CRAN release v0.10.0
New features
-
Started to implement unit testing with covr.
-
New option
claxes.alpha
inplot()
. When plotting one of the cubic models"CL"
or"RRCL"
with the axesK1
andK2
, this new option can be used to change the alpha level for which the regions of significance (i.e., the positions of the lines K1 and K2 that demarcate these regions) are computed. -
New option
alphacorrection
incaRange()
. Enables Bonferroni-correction when testing the outcome predictions of all data points behind the lineE2
for the cubic models"CA"
and"RRCA"
. -
Control variables can now be included in the RSA model by use of the option
control.variables
. When control variables are included in the model...- ...you have the option to center the control variables before model estimation, by use of the option
center.control.variables
. This can improve interpretability of the intercept, which will then reflect the predicted outcome value at the point (X,Y)=(0,0) when all control variables take their respective \emph{average` values. - ...the
summary
will show not only the overall R^2 of the model (which includes variance that is explained by the control variables), but also the increment of R^2 as compared to the baseline model with intercept and control variables. This R^2 increment will typically be of interest because it refers to the amount of variance explained by the two predictors X and Y (plus their squared and interaction terms) in the RSA model. - ...the AIC table obtained with
aictab
will include two additional columns: the increment of R^2 as compared to the baseline model (R2.baseline
) and the p-value for F-test of this increment (R2.baseline.p
). - ...the response surface that is shown with the
plot
function will show the model-predicted outcome values when all control variables take their respective mean values. - ...the number of parameters K per model that is shown in the
aictab
table will include the number of control variables (in addition to all freely estimated paramters, the intercept, and the residual variance).
`
- ...you have the option to center the control variables before model estimation, by use of the option
-
New options
center="pooled"
andscale="pooled"
inRSA()
, which allow centering/scaling the predictor variables on their pooled mean/SD. This option is typically preferred over variable-wise centering/scaling, because the "pooled" version preserves commensurability of the predictor scales. The possible options are: Default option ("none") applies no centering. "pooled" centers the predictor variables on their \emph{pooledsample mean. "variablewise" centers the predictor variables on \emph{their respective
sample mean. You should think carefully before applying the "variablewise" option, as centering the predictor variables at different values (e.g., their respective means) can affect the commensurability of the predictor scales.
Bug fixes/Glitches
- Had to react to a change in
lavaan
concerning model comparisons. In case that the models were estimated with robust ML and one of the models had df=0 (i.e., the full second-/third-order polynomial model),lavaan::lavTestLRT
would not allow to compare the (df=0)-model to a nested model because no scaled test statistic had been computed for the (df=0)-model in this case. In the released version, the internal label of the test statistic of the (df=0)-model is overwritten so that the chi-square difference test will be computed anyway. This is valid because the model with zero degrees of freedom has a chi-square test statistic of T=0. The output of the comparison will be the scaled test statistic of the nested model, which is the correct statistic for the scaled chi-square difference test in this case. Note that lavaan versions older than 0.6-3 (i.e., before 09/2018) have provided the standard chi-square instead of the scaled chi-square test statistic of the nested model in such a situation. Results that were obtained with lavaan version <= 0.6-2 can be reproduced by settingestimator="ML"
inRSA()
. - The
print
function for RSA objects now defaults to a sensible global model (second- or third-order full polynomial model) if no specific model is provided. - Fixed the formula for the AICc in
aictab
andcompare2
. In the formula of the (first-order) AIC, the number of free parameters K included the intercept and residual variance, but the second-order correction term did not. These two parameters are now consistently counted in K. This means that results for the (second-order) AICc might slightly change due to the fix, whereas results for the (first-order) AIC are the same. - In the
summary
, the R^2 value of the full model is now the R^2 of the model that was estimated withlavaan
. The R^2 of thelm
model which was shown here before can still be extracted from theRSA()
output object by inspecting$LM
. - Got rid of notorious "Warning sqrt(b3*b5)"