Learn R Programming

PathSelectMP (version 1.1)

ParseTotalEffects2: Parse and Exctract Total Effects

Description

finds names and values of total effects and returns as lists

Usage

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

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

Details

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

References

M Plus

See Also

TotalRiskRatios and CreateTotalEffMat

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab