search for: tylermw

Displaying 10 results from an estimated 10 matches for "tylermw".

2017 Nov 06
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...X1:X3B X1:X3C X2:X3B X2:X3C X1:X2:X3A X1:X2:X3B X1:X2:X3C (I take it that the combination of X3A and X3B and X3C implies dummy encoding, and the combination of only X3B and X3C implies contrasts encoding, with respect to X3A.) Thanks in advance, Arie On Sat, Nov 4, 2017 at 5:33 PM, Tyler <tylermw at gmail.com> wrote: > Hi Arie, > > I understand what you're saying. The following excerpt out of the book shows > that F_j does not refer exclusively to categorical factors: "...the rule > does not do anything special for them, and it remains valid, in a trivial > sen...
2017 Nov 04
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...your example, T_i = X1:X2:X3. Let F_j = X3. (The numerical variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, which in the example is dropped from the model. Hence the X3 in T_i must be encoded by dummy variables, as indeed it is. Arie On Thu, Nov 2, 2017 at 4:11 PM, Tyler <tylermw at gmail.com> wrote: > Hi Arie, > > The book out of which this behavior is based does not use factor (in this > section) to refer to categorical factor. I will again point to this > sentence, from page 40, in the same section and referring to the behavior > under question, that...
2017 Nov 06
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...X1:X2:X3C > > (I take it that the combination of X3A and X3B and X3C implies dummy > encoding, and the combination of only X3B and X3C implies contrasts > encoding, with respect to X3A.) > > Thanks in advance, > > Arie > > > On Sat, Nov 4, 2017 at 5:33 PM, Tyler <tylermw at gmail.com> wrote: > > Hi Arie, > > > > I understand what you're saying. The following excerpt out of the book > shows > > that F_j does not refer exclusively to categorical factors: "...the rule > > does not do anything special for them, and it remain...
2017 Nov 02
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...umeric-numeric interaction, ~(X1+X2+X3)^3-X1:X2." We have here T_i = X1:X2:X3. Also: F_j = X3 (the only factor). Then T_{i(j)} = X1:X2, which is dropped from the model. Hence the X3 in T_i must be encoded by dummy variables, as indeed it is. Arie On Tue, Oct 31, 2017 at 4:01 PM, Tyler <tylermw at gmail.com> wrote: > Hi Arie, > > Thank you for your further research into the issue. > > Regarding Stata: On the other hand, JMP gives model matrices that use the > main effects contrasts in computing the higher order interactions, without > the dummy variable encoding. I...
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...= X3. (The numerical > variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, > which in the example is dropped from the model. Hence the X3 in T_i > must be encoded by dummy variables, as indeed it is. > > Arie > > > On Thu, Nov 2, 2017 at 4:11 PM, Tyler <tylermw at gmail.com> wrote: > > Hi Arie, > > > > The book out of which this behavior is based does not use factor (in this > > section) to refer to categorical factor. I will again point to this > > sentence, from page 40, in the same section and referring to the behavior...
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...el, protecting you against losing marginality... Hence the model.matrix 'mm' is still square and nonsingular after the drop of X1, unless of course when a row is removed from the matrix 'design' when before creating 'mm'. Arie On Sun, Oct 15, 2017 at 7:05 PM, Tyler <tylermw at gmail.com> wrote: > You could possibly try to explain away the behavior for a missing main > effects term, since without the main effects term we don't have main effect > columns in the model matrix used to compute the interaction columns (At > best this is undocumented behavi...
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...3)^3-X1:X2." > > We have here T_i = X1:X2:X3. Also: F_j = X3 (the only factor). Then > T_{i(j)} = X1:X2, which is dropped from the model. Hence the X3 in T_i > must be encoded by dummy variables, as indeed it is. > > Arie > > On Tue, Oct 31, 2017 at 4:01 PM, Tyler <tylermw at gmail.com> wrote: > > Hi Arie, > > > > Thank you for your further research into the issue. > > > > Regarding Stata: On the other hand, JMP gives model matrices that use the > > main effects contrasts in computing the higher order interactions, > without...
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...marginality... Hence the > model.matrix 'mm' is still square and nonsingular after the drop of > X1, unless of course when a row is removed from the matrix 'design' > when before creating 'mm'. > > Arie > > On Sun, Oct 15, 2017 at 7:05 PM, Tyler <tylermw at gmail.com> wrote: > > You could possibly try to explain away the behavior for a missing main > > effects term, since without the main effects term we don't have main > effect > > columns in the model matrix used to compute the interaction columns (At > > best th...
2017 Oct 15
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...teraction, including all three values of X2. In the third result, we have no main effect of X2, The effect of X2 depends on the value of X1; either p or q. A complicating element with your example seems to be that your X1 and X2 are not factors. Arie On Thu, Oct 12, 2017 at 7:12 PM, Tyler <tylermw at gmail.com> wrote: > Hi, > > I recently ran into an inconsistency in the way model.matrix.default > handles factor encoding for higher level interactions with categorical > variables when the full hierarchy of effects is not present. Depending on > which lower level interacti...
2017 Oct 12
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hi, I recently ran into an inconsistency in the way model.matrix.default handles factor encoding for higher level interactions with categorical variables when the full hierarchy of effects is not present. Depending on which lower level interactions are specified, the factor encoding changes for a higher level interaction. Consider the following minimal reproducible example: -------------- >