*! version 1.0 2/21/2018

Title

gfi -- defines and works with the formula for the structure of a designated focal variable’s interactive effect on the “modeled” outcome.

Description

gfi produces algebraic expression for the effect of a focal variable as it changes with the moderators, a sign change analysis of the effect
and an optional visualization in a path-style diagram. Must run intspec before running gfi. See Kaufman (2018)
for detailed explanation and step-by-step examples of using this and other ICALC add-on commands.

Syntax

gfi , [ factorchg ndigits(#) path(type , title(string) name(string)
boxwidth(#) ygap(#) xgap(#) ndigits(#) ) ]

options Description

factorchg algebraic expression for moderated effect of focal variable also shown as a factor change if this keyword is specified

ndigits(#) number of digits after decimal for effects and coefficients in algebraic expression and sign change table. Default = 4.

path(type, suboptions) Create path diagram of structure of interaction effect

type focal or all. focal shows only coefficient values for variables involving focal variable.
all shows all coefficient values. Default is focal.

suboptions title(string) string is title for path diagram

name(string) save as memory graph with name given by string

ndigits(#) # of digits used to report coefficient values in diagram

boxwidth(#), ygap(#), xgap(#) use to fine-tune graph. boxwidth sets width of boxes;
ygap sets vertical distance between boxes; xgap sets horizontal distance between boxes. Defaults are boxwidth(1.25), ygap(.625), xgap(1.25).

Note: Moderator range( ) specifications define points at which moderated effect is calculated in sign change analysis.
For categorical variables all categories define calculation points.

Example: two-way interaction

For a model predicting poor mental health days (pmhdays) by the interaction of work-family conflict (wfconflict) and job status (sei), intspec
specfies wfconflict as the focal variable and sei as its moderator. gfi produces the formula for how Job STatus (sei) moderates the effect of
Work Famly Conlict (wfconflict) on pmhdays and a table portraying when, if at all, the moderated effect of wfconflict changes sign.

nbreg pmhdays c.wfconflict##c.sei ...

intspec, focal(c.wfconlifct) main( (c.sei name(JobStatus) range(17(10)97)) (c.wfconflict name(WorkFamConflict) range(1/4))) int2vars(c.wfconflict#c.sei)

gfi , ndigits(5)

*** Also show formula for moderated effect of wfconflict as a factor change

gfi , ndigits(5) factorchg

*** Also draw path-style diagram of the effect of wfconflict moderated by sei

gfi , ndigits(5) factorchg path(all)

Author and Citation

I would appreciate users of this and other ICALC commands citing

Robert L. Kaufman. 2018. Interaction Effects in Linear and Generalized Linear Models, Sage Publcations.