Skip to content

updated help text of uf_addmarginal #142

@chsquare

Description

@chsquare

Hi,

As mentioned to @behinger over e-mail: Dealing with a continuous predictor, I noticed that uf_addmarginal doesn't only add mean(continuous_predictor) but also the intercept to each beta. This behaviour is actually described by the command line output when running uf_addmarginal, however, the help text of that function was less clear to me. So perhaps consider updating it from:

...
Using uf_addmarginal(), the average response is added to all predictors:
 
    intercept: the response of facA==0 AND continuousB@mean(continuousB)
    intercept: the response of facA==1 AND continuousB@mean(continuousB)
    continuousB@0  : the response of facA==0 if continuous B is 0 
    continuousB@50 : the response of facA==0 if continuous B is 50
    continuousB@100: the response of facA==0 if continuous B is 100

to something like

...
Using uf_addmarginal(), the average response for continuousB and the models intercept are added to all predictors:
 
    intercept: the response of facA==0 AND continuousB@mean(continuousB)
    factA==1: the response of facA==1 AND continuousB@mean(continuousB)
    continuousB@0  : the response of facA==0 if continuous B is 0 
    continuousB@50 : the response of facA==0 if continuous B is 50
    continuousB@100: the response of facA==0 if continuous B is 100

When you calculate model means from the predictors in the presence of interactions between factors, consider that, 
after applying uf_addmarginal(), each predictor includes mean(continuousB) and the intercept, which means 
that when you add up the predictors that contribute to the interaction you should subtract again the intercept term for
each term that you have added in order to avoid duplicating the contributions from the intercept (and from the continuousB).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions