Displaying 3 results from an estimated 3 matches for "dob_mon".
Did you mean:
dbmon
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 = c(1489634L, 17491L, 134985L, 1639L, 47892L,
611L, 4365L, 750L), pred1 = c(1488301, 18187, 135605, 1657, 48547,
593, 4423, 54)), .Names = c("dob_day", "dob_mo...
2017 Oct 09
1
Using response variable in interaction as explanatory variable in glm crashes R
>>>>> Jan van der Laan <rhelp at eoos.dds.nl>
>>>>> on Fri, 6 Oct 2017 12:13:39 +0200 writes:
> It is actually model.matrix that crashes, not glm. Same
> crash occurs with e.g. lm.
> model.matrix(dob_mon ~ dob_day*dob_mon, data = tab)
> also crashes R.
Yes, segmentation fault.
It only happens when these are *logical* variables, not, e.g., when
transformed to integer.
The C code in src/library/stats/src/model.c tries to eliminate
occurances of the LHS of the formula from the RHS when bui...
2017 Oct 06
0
Using response variable in interaction as explanatory variable in glm crashes R
It is actually model.matrix that crashes, not glm. Same crash occurs
with e.g. lm.
model.matrix(dob_mon ~ dob_day*dob_mon, data = tab)
also crashes R.
Jan
On 06-10-17 12:08, Jan van der Laan wrote:
>
> 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.
>
>
> ta...