powered by
Treat moderator name with mean value
treatModerator( ind, moderatorNames, data = NULL, rangemode = 1, probs = c(0.16, 0.5, 0.84) )
An equation
character vectors
A data.frame
range mode
numeric vector of probabilities with values in [0,1]
ind="(a1+a4*sex+a5*age)*(b1)" moderatorNames=c("age","sex") treatModerator(ind,moderatorNames) ind="c1+c3*hp" moderatorNames="hp" treatModerator(ind,moderatorNames)
Run the code above in your browser using DataLab