Skip to content

Commit

Permalink
CRAN release 0.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
nicebread committed Feb 22, 2016
1 parent 4a2f587 commit 2213a8d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 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.9
Date: 2015-04-13
Version: 0.9.10
Date: 2016-02-22
Author: Felix Schönbrodt
Maintainer: Felix Schönbrodt <[email protected]>
Description: Advanced response surface analysis. The main function RSA computes
Expand Down
4 changes: 2 additions & 2 deletions R/RSA.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @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 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 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. If you want to reproduce standard OLS estimates, use \code{estimator="ML"} and \code{se="standard"}
#' @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 cases with missing values should be excluded, use \code{missing = "listwise"}.
#' @param ... Additional parameters passed to the \code{lavaan} \code{\link{sem}} function.
Expand Down Expand Up @@ -416,7 +416,7 @@ withCallingHandlers({
"PA1.curv := b3 - b4*p11 + b5*(p11^2)",
"PA2.curv := b3 - b4*p21 + b5*(p21^2)",
"meaneffect := a1",
"C := (b2-b1) / (4*b3)",
"C := (b1-b2) / (4*b3)",
# eigenvalues
"l1 := (b3 + b5 + sqrt((b3+b5)^2 - 4*b3*b5 + b4^2))/2",
"l2 := (b3 + b5 - sqrt((b3+b5)^2 - 4*b3*b5 + b4^2))/2",
Expand Down
2 changes: 1 addition & 1 deletion R/compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ compare <- function(x, verbose=TRUE, plot=FALSE, digits=3, ...) {
cat("-------------------------------------------------------------------------\n")
}

res1 <- cModels(list(cubic=cubic, full=full, IA=IA, additive=additive, diff=diff, null=null), set="directed", free.max)
res1 <- cModels(mL=list(cubic=cubic, full=full, IA=IA, additive=additive, diff=diff, null=null), set="directed", free.max=free.max)
if (verbose==TRUE & !is.null(res1)) {
cat("Testing directed difference models: Interaction, additive main effects, difference model :\n")
cat("-------------------------------------------------------------------------\n")
Expand Down
15 changes: 10 additions & 5 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ anovaList <- function(modellist) {
paste("force(mods[[",x,"]])",sep = "")
}
})
pStr2 <- paste0("anova(", paste(pStr, collapse=", "), ")")
#pStr2 <- paste0("lavTestLRT(", paste(pStr, collapse=", "), ", method='satorra.bentler.2010')")
pStr2 <- paste0("lavTestLRT(", paste(pStr, collapse=", "), ", method='default')")

a1 <- eval(parse(text = pStr2))

Expand All @@ -89,10 +90,14 @@ cModels <- function(mL, set, free.max) {
R <- inspect(X, "r2")
names(R) <- "R2"
n <- lavaan::nobs(X)
k <- free.max - F["df"]
R2.p <- ifelse(k==0,
NA,
pf(((n-k-1)*R)/(k*(1-R)), k, n-k-1, lower.tail=FALSE))
k <- free.max - F["df"]

suppressWarnings({
R2.p <- ifelse(k==0,
NA,
pf(((n-k-1)*R)/(k*(1-R)), k, n-k-1, lower.tail=FALSE))
})

names(R2.p) <- "R2.p"

# compute AICc
Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* win-builder (devel and release)

## R CMD check results
There were no ERRORs, WARNINGs, or NOTEs.

There were no ERRORs, WARNINGs, or relevant NOTEs.

## Downstream dependencies
None.
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.10}{



\subsection{Bug fixes}{
\itemize{
\item Fixed a wrong sign in the C parameter of the SRR model (thanks to Sarah Humberg for detecting the bug.)
}
}

}


\section{Version 0.9.9}{


Expand Down
2 changes: 1 addition & 1 deletion man/RSA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2213a8d

Please sign in to comment.