PATHj version ≥ 0.5.0

Introduction

GAMLj module can be installed and used in R as a standard R packages. Please check the R help for details. Here we provide some appliactions of the package in R.

Installation

At the moment, PATHj is not in CRAN yet, so you need to install it via devtools

devtools::install_github("pathj/pathj")

Path Analysis

Description

Path Analysis

Usage

 
 pathj( 
   data, 
   endogenous = NULL, 
   factors = NULL, 
   covs = NULL, 
   multigroup = NULL, 
   se = "standard", 
   r2ci = "fisher", 
   r2test = FALSE, 
   bootci = "perc", 
   ci = TRUE, 
   ciWidth = 95, 
   bootN = 1000, 
   showintercepts = TRUE, 
   intercepts = TRUE, 
   indirect = FALSE, 
   contrasts = NULL, 
   showRealNames = TRUE, 
   showContrastCode = FALSE, 
   scaling = NULL, 
   endogenousTerms = list(list()), 
   diagram = FALSE, 
   diag_paths = "est", 
   diag_resid = FALSE, 
   diag_labsize = "medium", 
   diag_rotate = "2", 
   diag_type = "tree2", 
   diag_shape = "rectangle", 
   diag_abbrev = "0", 
   varcov = NULL, 
   cov_y = TRUE, 
   cov_x = TRUE, 
   constraints = list(), 
   constraints_examples = FALSE, 
   showlabels = FALSE, 
   scoretest = TRUE, 
   cumscoretest = FALSE, 
   estimator = "ML", 
   likelihood = "normal", 
   formula 
 ) 
 

Arguments

data

the data as a data frame

endogenous

a vector of strings naming the mediators from data

factors

a vector of strings naming the fixed factors from data

covs

a vector of strings naming the covariates from data

multigroup

factor defining groups for multigroup analysis

se

.

r2ci

Choose the confidence interval type

r2test

.

bootci

Choose the confidence interval type

ci

.

ciWidth

a number between 50 and 99.9 (default: 95) specifying the confidence interval width for the parameter estimates

bootN

number of bootstrap samples for estimating confidence intervals

showintercepts

TRUE or FALSE (default), show intercepts

intercepts

TRUE or FALSE (default), show intercepts

indirect

TRUE or FALSE (default), show intercepts

contrasts

a list of lists specifying the factor and type of contrast to use, one of ‘deviation’, ‘simple’, ‘difference’, ‘helmert’, ‘repeated’ or ‘polynomial’

showRealNames

TRUE or FALSE (default), provide raw names of the contrasts variables

showContrastCode

TRUE or FALSE (default), provide contrast coefficients tables

scaling

a named vector of the form c(var1=‘type’, var2=‘type2’) specifying the transformation to apply to covariates, one of ‘centered’ to the mean, ‘standardized’,‘log’ or ‘none’. ‘none’ leaves the variable as it is.

endogenousTerms

a list of lists specifying the models for with the mediators as dependent variables.

diagram

TRUE or FALSE (default), produce a path diagram

diag_paths

Choose the diagram labels

diag_resid

TRUE or FALSE (default), produce a path diagram

diag_labsize

Choose the diagram labels

diag_rotate

Choose the diagram labels

diag_type

Choose the diagram labels

diag_shape

Choose the diagram labels

diag_abbrev

Choose the diagram labels

varcov

a list of lists specifying the covariances that need to be estimated

cov_y

TRUE or FALSE (default), produce a path diagram

cov_x

TRUE or FALSE (default), produce a path diagram

constraints

a list of lists specifying the models random effects.

constraints_examples

.

showlabels

.

scoretest

.

cumscoretest

.

estimator

Choose the diagram labels

likelihood

Choose the diagram labels

formula

(optional) the formula to use, see the examples

Value

Examples

Comments?

Got comments, issues or spotted a bug? Please open an issue on PATHj at github or send me an email