search for: firstfactor

Displaying 3 results from an estimated 3 matches for "firstfactor".

2017 Oct 09
1
Using response variable in interaction as explanatory variable in glm crashes R
.../stats/src/model.c tries to eliminate occurances of the LHS of the formula from the RHS when building the model matrix and it does work fine in the integer case. Part of the culprit code may be this (from line 717), with the isLogical(.) which in our case, shifts the pointer by 1 in the call to firstfactor() : int adj = isLogical(var_i)?1:0; // avoid overflow of jstart * nn PR#15578 firstfactor(&rx[jstart * nn], n, jnext - jstart, REAL(contrast), nrows(contrast), ncols(contrast), INTEGER(var_i)+adj); then in firstfactor(), we see the segfault (when running R with '-...
2017 Oct 06
2
Using response variable in interaction as explanatory variable in glm crashes R
The following code crashes R (I know I shouldn't try to estimate such a model; this was a bug in some code of mine). I also tried with R-devel; same result. tab <- structure(list(dob_day = c(FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE), dob_mon = c(FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE), dob_year = c(FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE), n =
2012 Sep 07
2
Contrasts for 2x4 interaction in mixed effects model
Hello everyone, I am running a mixed effects model where I have two fixed factors, one with 2 levels and one with 4, and their interaction. Let's say these are my factors and their levels: FirstFactor: 1, 2 SecondFactor: A, B, C, D For the interaction, I am interested in the four two-way comparisons, not the two four-way comparisons. In other words, I want to test whether 1A is significantly different than 2A, whether 1B is significantly different than 1B, etc; I am not interested in the compar...