Skip to content

Commit

Permalink
updating the function list in package, dropping unused rd files
Browse files Browse the repository at this point in the history
  • Loading branch information
tbates committed Nov 1, 2013
1 parent 4f1c4cb commit eacab69
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 300 deletions.
11 changes: 10 additions & 1 deletion R/deprecated.r
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ twoGroupOrdinal <- function(modelName ="Ordinal", selDVs, factorLevels, dzData,
stop("Change \"twoGroupOrdinal\" to: makeOrdinal_2Group")
}

umxGraph_RAM <- function(model = NA, std = T, precision = 2, dotFilename = "name", pathLabels = "none", showFixed = F, showError = T) {
stop("Replace umxGraph_RAM with umxPlot (umxGraph_RAM was deprecated to help people learn umx more quickly)")
}

tryHard <- function(model, n = 3, calc_SE = F){stop("Use umxRun() in place of umxTryHard() and tryHard()")}

genEpi_ReRun <- function(lastFit, dropList=NA, regex=NA, free=F, value=0, freeToStart=NA, newName=NA, verbose=F, intervals=F) {message("please call umxReRun()")}
Expand Down Expand Up @@ -305,4 +309,9 @@ stringToMxAlgebra <- function(algString, name = NA, dimnames = NA) {

genEpi_EvalQuote <- function(expstring, model, compute, show){
stop("Deprecated: Please replace genEpi_EvalQuote with umxEval")
}
}


umxReportCIs <- function(model = NA, addCIs = T, runCIs = "if necessary") {
stop("Deprecated: Please replace umxReportCIs with umxCI")
}
28 changes: 24 additions & 4 deletions R/fit_and_reporting.r
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ umxCompare <- function(base = NULL, comparison = NULL, all = TRUE, output = "ret
# }
}

#' extractAIC
#'
#' returns the AIC for an OpenMx model
#'
#' @param model an \code{\link{mxModel}} to get the AIC for
#' @return - AIC value
#' @export
#' @seealso - \code{\link{umxRun}}, \code{\link{umxCompare}}
#' @references - \url{http://openmx.psyc.virginia.edu}
#' @examples
#' \dontrun{
#' x = extractAIC(model)
#' }
extractAIC.MxModel <- function(model) {
require(umx)
a = umx::umxCompare(model)
return(a[1,"AIC"])
}


#' umxSummary
#'
#' Report the fit of a model in a compact form suitable for a journal. Emits a "warning" not
Expand Down Expand Up @@ -171,9 +191,9 @@ umxSummary <- function(model, saturatedModels = NULL, report = "line", showEstim
})
}

#' umxReportCIs
#' umxCI
#'
#' umxReportCIs umxReportCIs adds mxCI() calls for all free parameters in a model,
#' umxCI adds mxCI() calls for all free parameters in a model,
#' runs the CIs, and reports a neat summary.
#'
#' This function also reports any problems computing a CI. The codes are standard OpenMx errors and warnings
Expand All @@ -200,10 +220,10 @@ umxSummary <- function(model, saturatedModels = NULL, report = "line", showEstim
#' umxReportCIs(model)
#' }

umxReportCIs <- function(model = NA, addCIs = T, runCIs = "if necessary") {
umxCI <- function(model = NA, addCIs = T, runCIs = "if necessary") {
# TODO add code to not-run CIs
if(is.na(model)){
message("umxReportCIs adds mxCI() calls for all free parameters in a model, runs them, and reports a neat summary. A use example is:\n umxReportCIs(model)")
message("umxCI adds mxCI() calls for all free parameters in a model, runs them, and reports a neat summary. A use example is:\n umxReportCIs(model)")
stop();
}
message("### CIs for model ", model@name)
Expand Down
4 changes: 0 additions & 4 deletions R/xmu.r
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,3 @@ xmuMI <- function(model, vector = T) {
close(bar)
return(ret)
}

umxGraph_RAM <- function(model = NA, std = T, precision = 2, dotFilename = "name", pathLabels = "none", showFixed = F, showError = T) {
stop("Replace umxGraph_RAM with umxPlot (umxGraph_RAM was deprecated to help people learn umx more quickly)")
}
63 changes: 52 additions & 11 deletions man/umx-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,31 @@ library("umx")

\bold{Index:}

\bold{Build, Run, and Report}
\bold{Build and Run a Model}

\code{\link{umxLabel}} Add labels to all parameters of a model

\code{\link{umxStart}} Set sensible start values

\code{\link{umxRun}} Run a model, adding saturated models if necessary, optionally adds labels and starts

\code{\link{umxCompare}} Compare one or more models
\code{\link{umxLatent}} Create a latent variable, taking care of reflective/formative distinctions automagically

\code{\link{umxSummary}} Compact report of model fit
\code{\link{umxSaturated}} Create saturated and independence models so that reporting works. (called from umxRun for you)

\code{\link{umxCI}} Report FIML CIs on a model, creating them if necessary
\bold{Get reports of model results}

\code{\link{umxSummary}} Compact report of model fit

\code{\link{umxPlot}} Create a Path Diagram from your model!

\code{\link{umxCompare}} Compare one or more models

\code{\link{umxCI}} Add and report FIML Confidence Intervals for a model.

\code{\link{extractAIC.MxModel}} Report the AIC for a model.



\bold{Updating & Modifying}

Expand All @@ -59,12 +68,18 @@ library("umx")

\code{\link{umxMI}} Compute modification indices for RAM models

\code{\link{umxGetParameters}} A regex enabled version of \code{\link{mxGetParameters}}

\bold{High-level reporting}

\code{\link{umxUnexplainedCausalNexus}}
\code{\link{umxUnexplainedCausalNexus}} Compute the change in an outcome variable that flows from a change in an input



\bold{Utilities}

\code{\link{umxUpdateOpenMx}} umxUpdateOpenMx

\code{\link{umxStandardizeModel}} Standardize a RAM Model

\code{\link{umxReportTime}} Show how long a model took to run
Expand All @@ -73,23 +88,49 @@ library("umx")

\code{\link{umxJiggle}} Jiggle values in a list

\code{\link{umxUpdateOpenMx}} umxUpdateOpenMx

\code{\link{umxHasCIs}} Utility function to ask a model if it has CIs

\code{\link{umxIsMxModel}} Utility function to an object "Are you an OpenMx model?"
\code{\link{umxIsMxModel}} Utility function to ask an object "Are you an OpenMx model?"

\code{\link{umxIsRAMmodel}} Utility function to ask an object "Are you an OpenMx RAM model?"

\code{\link{umxIsOrdinalVar}} Utility function to ask an object "Are you an ordinal variable?"

\code{\link{umxIsRAMmodel}} Utility function to an object "Are you an OpenMx RAM model?"
\code{\link{umx_find_object}} Find an OpenMx (or other) object by name

\code{\link{umx_grep_labels}} Find labels (SPSS-style) which match a regular expression. Useful.

\code{\link{umxCov2cor}} Convert a covariance matrix to a corelation matrix, guaranteeing the upper and lower triangles are exact equal

\code{\link{umx_is_cov}} Test if data is a covariance matrix

\code{\link{umx_reorder}} Reorder the variables in a covariance matrix (including dropping variables)

\code{\link{umxLower2full}} Take a lower matrix and populate the upper triangle

\bold{Non-SEM helpers}

\code{\link{print.dataframe}} print dataframe in readable form by supressing NA and rounding 0
\code{\link{umx_swap_a_block}} Swap places with one block of data to another

\code{\link{umx_move_file.Rd}} Flexibly move files on the filesystem

\code{\link{umx_rename_file.Rd}} Flexibly rename files on the filsystem

\code{\link{umx_greater_than}} A version of %>% which excludes NA

\code{\link{umx_less_than}} A version of %<% which excludes NA

\code{\link{umx_cor}} Report correlations and their p-values

\code{\link{print.dataframe}} Print dataframe in readable form by supressing NAs, rounding numbers, and presenting zeros as "0"

\code{\link{umxAnovaReport}} Format an anova model into an APA-style report

\code{\link{Stouffer.test}} Run a Stouffer.test (meta-analytic p-value)

\code{\link{umx_u_APA_pval}} Utility function to format a p-value for APA (three decimals, "<.001" if under that)
\code{\link{umx_APA_pval}} Utility function to format a p-value for APA (three decimals, "<.001" if under that)

\code{\link{umx_round}} Control rounding in ways of more use to scientists than computers

\code{\link{umxDescriptives}} Utility function to generate participant section for an APA-style article.

Expand Down
47 changes: 0 additions & 47 deletions man/umxGraph_RAM.Rd

This file was deleted.

17 changes: 0 additions & 17 deletions man/umxGreaterThan.Rd

This file was deleted.

18 changes: 0 additions & 18 deletions man/umxLessThan.Rd

This file was deleted.

40 changes: 0 additions & 40 deletions man/umxMI_top.Rd

This file was deleted.

48 changes: 0 additions & 48 deletions man/umxRenameFile.Rd

This file was deleted.

Loading

0 comments on commit eacab69

Please sign in to comment.