Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modSummary2

Make table summarizing moderation effect


Description

Make table summarizing moderation effect

Usage

modSummary2(
  fit,
  rangemode = 2,
  pred.values = NULL,
  summarymode = 2,
  maxylev = 6,
  digits = 3,
  labels = NULL,
  ...
)

Arguments

fit

An object of class lm

rangemode

An integer. If 1, mean+c(-1,0,1)*sd used. If 2, 16th, 50th and 84th percentiles are used

pred.values

Values of predictor variables

summarymode

An integer. 1 or 2. SUmmarizing method of variables. If 1, typical values are used. If 2, mean values are used

maxylev

An integer. Maximum length of predictor variables to be treated as a categorical variable.

digits

An integer indicating the number of decimal places

labels

Optional list of labels of variables

...

Further arguments to be passed to predict3d::fit2newdata()

Examples

labels=list(X="negemot",W="sex",Z="age",Y="govact",C1="posemot",C2="ideology")
fit=lm(govact~negemot*sex+negemot*age+posemot+ideology,data=glbwarm)
modSummary2(fit,rangemode=2,mod2.values=c(30,50,70),summarymode=2)
modSummary2(fit,mod2.values=c(30,50,70),summarymode=1,labels=labels)
labels=list(X="frame",W="skeptic",Y="justify")
fit=lm(justify~frame*skeptic,data=disaster)
modSummary2(fit,labels=labels)

processR

Implementation of the 'PROCESS' Macro

v0.2.6
GPL-2
Authors
Keon-Woong Moon [aut, cre], Sokyoung Hong [ctb]
Initial release
2021-1-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.