You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like it is done in popular software, I think it is important to have the ability to declare nested factors. The main difference with InteractionTerm is that not all combinations will be represented in the model, but only existed. Then it will be possible to get the real number of levels in each group. Also it will be possible to calculate the correct lsmeans.
For example, if you have models y~sequence + subject and y~sequence + subject(sequence) your lsmeans will not be correct in the first case if the factor subject and sequence is really nested.
This isn't really possible without a pretty substantial overhaul of how the schema is extracted. Right now, one schema is extracted for each leaf Term; in order for this to be workable, you need more information than that can give you (i.e., the combination of levels that are present in the data).
Related to #154, we'd also need some way of distinguishing from a "normal" interaction term; if that way is additional special syntax, then we'd need to be able to convert the FunctionTerm created by whatever syntax that is into this NestedTermbefore the schema is extracted (because how else would we know that we need to extract the unique combinations of the individual terms rather than the unique levels of each individual term), but currently the mechanism that converts special syntax into custom terms happens after a schema is extracted.
Like it is done in popular software, I think it is important to have the ability to declare nested factors. The main difference with InteractionTerm is that not all combinations will be represented in the model, but only existed. Then it will be possible to get the real number of levels in each group. Also it will be possible to calculate the correct lsmeans.
For example, if you have models
y~sequence + subject
andy~sequence + subject(sequence)
your lsmeans will not be correct in the first case if the factorsubject
andsequence
is really nested.https://www.ibm.com/docs/en/spss-statistics/29.0.0?topic=effects-build-nested-terms
https://stats.oarc.ucla.edu/sas/examples/da4/design-and-analysis-fourth-edition-by-keppel-and-wickenschapter-25-nested-factors/
https://support.minitab.com/en-us/minitab/20/help-and-how-to/statistical-modeling/anova/supporting-topics/anova-models/what-are-crossed-and-nested-factors/
The text was updated successfully, but these errors were encountered: