Skip to content

Commit

Permalink
v0.9.8: Minor bug fixes
Browse files Browse the repository at this point in the history
- removed control.variables feature (not available yet)
- suppress some unnecessary warnings
  • Loading branch information
nicebread committed Mar 23, 2015
1 parent fb0cfcf commit 1035d8f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Encoding: UTF-8
Package: RSA
Type: Package
Title: Response Surface Analysis
Version: 0.9.7
Date: 2015-03-03
Version: 0.9.8
Date: 2015-03-23
Author: Felix Schönbrodt
Maintainer: Felix Schönbrodt <felix@nicebread.de>
Description: Advanced response surface analysis. The main function RSA computes
Expand Down
8 changes: 6 additions & 2 deletions R/RSA.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @param verbose Should additional information during the computation process be printed?
#' @param models A vector with names of all models that should be computed. Should be any from \code{c("absdiff", "absunc", "diff", "mean", "additive", "IA", "SQD", "RR", "SRR", "SRRR", "SSQD", "SRSQD", "full", "null", "onlyx", "onlyy", "onlyx2", "onlyy2")}. For \code{models="all"}, all models are computed, for \code{models="default"} all models besides absolute difference models are computed.
#' @param cubic Should a cubic model with the additional terms Y^3, XY^2, YX^2, and X^3 be included? WARNING: This is experimental, and not all functions will treat the cubic extension properly yet.
#' @param control.variables A string vector with variable names from \code{data}. These variables are added as linear predictors to the model (in order "to control for them"). No interactions with the other variables are modeled. WARNING: This feature is very beta, and seems to break some model comparisons. Use with caution (or better: don't use it at all, yet).
#' @param control.variables A string vector with variable names from \code{data}. These variables are added as linear predictors to the model (in order "to control for them"). No interactions with the other variables are modeled. WARNING: This feature is not implemented yet!
#' @param estimator Type of estimator that should be used by lavaan. Defaults to "MLR", which provides robust standard errors, a robust scaled test statistic, and can handle missing values.
#' @param se Type of standard errors. This parameter gets passed through to the \code{sem} function of the \code{lavaan} package. See options there. By default, robust SEs are computed. If you use \code{se="boot"}, \code{lavaan} provides CIs and p-values based on the bootstrapped standard error. If you use \code{confint(..., method="boot")}, in contrast, you get CIs and p-values based on percentile bootstrap (see also \code{\link{confint.RSA}}).
#' @param missing Handling of missing values. By default (\code{NA}), Full Information Maximum Likelihood (FIML) is employed in case of missing values. If families with missing values should be excluded, use \code{missing = "listwise"}
Expand Down Expand Up @@ -79,6 +79,9 @@ RSA <- function(formula, data=NULL, center=FALSE, scale=FALSE, na.rm=FALSE,
verbose=TRUE, add = "", estimator="MLR",
se = "robust", missing=NA, ..., control.variables=c()) {


if (length(control.variables) > 0) stop("Control.variables feature not implemented yet!")

validmodels <- c("absdiff", "absunc", "diff", "mean", "additive", "IA", "SQD", "SRRR", "SRR", "RR", "SSQD", "SRSQD", "full", "null", "onlyx", "onlyy", "onlyx2", "onlyy2", "weak", "strong")

if (length(models)==1 & models[1]=="all") {models <- validmodels}
Expand Down Expand Up @@ -716,7 +719,8 @@ withCallingHandlers({
if (
(W[1] == "sqrt" & W[2] == "diag(def.cov)" & grepl("NaNs", w$message)) |
(W[1] == "sqrt" & W[2] == "b3 * b5") |
(W[1] == "nlminb" & W[2] == "x.par")
(W[1] == "nlminb" & W[2] == "x.par") |
(W[2] %in% c("m.SRRR.up", "m.SRRR.down", "m.SRSQD.up", "m.SRSQD.down") & grepl("model has NOT converged", w$message))
) {invokeRestart("muffleWarning")}
} )

Expand Down
13 changes: 13 additions & 0 deletions inst/News.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
\encoding{UTF-8}


\section{Version 0.9.8}{


\subsection{Bug fixes}{
\itemize{
\item Removed the beta version of the control.variables feature - this broke some functions.
\item Removed some unnecessary warning that might confuse users.
}
}

}


\section{Version 0.9.7}{


Expand Down
2 changes: 1 addition & 1 deletion man/RSA.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RSA(formula, data = NULL, center = FALSE, scale = FALSE, na.rm = FALSE,
\item{...}{Additional parameters passed to the \code{lavaan} \code{\link{sem}} function.}
\item{control.variables}{A string vector with variable names from \code{data}. These variables are added as linear predictors to the model (in order "to control for them"). No interactions with the other variables are modeled. WARNING: This feature is very beta, and seems to break some model comparisons. Use with caution (or better: don't use it at all, yet).}
\item{control.variables}{A string vector with variable names from \code{data}. These variables are added as linear predictors to the model (in order "to control for them"). No interactions with the other variables are modeled. WARNING: This feature is not implemented yet!}
}
\description{
Performs several RSA model tests on a data set with two predictors
Expand Down

0 comments on commit 1035d8f

Please sign in to comment.