ParseTotalEffects2: Parse and Exctract Total Effects

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/ParseTotalEffects2.R

Description

finds names and values of total effects and returns as lists

Usage

1
ParseTotalEffects2(OutFile, StandardError = FALSE, PVal = FALSE, Indirect = FALSE)

Arguments

OutFile

name of folder where .inp and .out files are located

StandardError

if TRUE then standard errors are returned default is false and if also PVal is false then effects returned

PVal

if TRUE then p values for total effects are returns default is FALSE

Indirect

if 1 then total indirect effects are returned if 0 then total effects are returned

Details

helper function for TotalRiskRatios, CreateTotalEffMat and all other total effect functions and does not need to be used by regular user

Value

TotalVals

1st list is values returned either total effects or standard errors of total effects or p values of total effects

TotalEffectNames

list of names of total effects

Note

helper function, but useful for parsing if modifying package or certain functions

Author(s)

William Terry

References

M Plus

See Also

TotalRiskRatios and CreateTotalEffMat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

InitD=Simulate(MissingYN=0,exampleNum=3)
xxx=Initialize(InitD,NumImpute=0,WhichCat=c(1,1,1,1,1,0,1,0),PasteIND=1)
ggg=AllBackwardSelect(xxx[[1]])
AllDat1=ConvertData2(xxx[[1]],xxx[[2]],yyy[[1]])
Directry=getwd()
LastFileOut=AllDat1[[1]][[1]]
TO=paste(Directry,"/",LastFileOut,sep="")
files <- list.files(path=TO,pattern = ".out$")
hh=lapply(strsplit(files,"_"),NumEndFile,pattern1=".out",pattern2='out')
hh=as.numeric(paste(hh))
LastFileName=files[which(hh==max(hh))]
x=scan(paste(TO,"/",LastFileName,sep=""),what=character())
GG=ParseTotalEffects2(x)

## End(Not run)

PathSelectMP documentation built on May 2, 2019, 3:15 a.m.