TotalRiskRatios: Calculate Risk Ratios for total effects

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

View source: R/TotalRiskRatios.R

Description

Risk Ratios for the total effects are calculated using threshold values obtained for direct effects and the total effect values see in AllTotalEffOutput

Usage

1
TotalRiskRatios(AllDat, Directry = getwd(), InputDepVal = 1)

Arguments

AllDat

output from ConvertData2

Directry

this the path where the folder specified by AllNames is located and default is working directory

InputDepVal

a number which is the value of the dependent variable used for risk ratio which is compared to 0 in risk ratio calculation, default value is 1

Details

total effects are sum of direct and indirect effects where indirect effects are the product of all direct effects in the chain which comprises the indirect variable chain, this total effect value is converted to its probability using the threshold values for direct effects and multiplying the total effect with the specified input value

Value

returns data frame with risk ratios in place of total effects

Note

of course backwards selection and other functions must run first, see example

Author(s)

William Terry

References

M Plus

See Also

codeAllTotalEffOutput, codeAverageRRs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

InitD=Simulate(MissingYN=1)
xxx=Initialize(InitD,NumImpute=3,WhichCat=c(1,1,1,1,0))
ggg=AllBackwardSelect(xxx[[1]])
yyy=AllSummary2(xxx[[1]])
AllDat1=ConvertData2(xxx[[1]],xxx[[2]],yyy[[1]])
RRT1=lapply(AllDat1,TotalRiskRatios,InputDepVal=1)

## End(Not run)

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