Re: [Rd] Discourage the weights= option of lm with summarized data

2017-12-03 Thread Arie ten Cate
> be suboptimal; in the case of replication weights, even wrong. > Hence, standard errors and analysis of variance tables should be > treated with care. > > OK? > > > -pd > > >> On 12 Oct 2017, at 13:48 , Arie ten Cate <arietenc...@gmail.com>

Re: [Rd] Discourage the weights= option of lm with summarized data

2017-11-28 Thread Arie ten Cate
rambsch." Let us repair the other bug also. Arie On Thu, Oct 12, 2017 at 1:48 PM, Arie ten Cate <arietenc...@gmail.com> wrote: > OK. We have now three suggestions to repair the text: > - remove the text > - add "not" at the beginning of the text > - add at t

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-11-06 Thread Arie ten Cate
, the terms() function is only following the cited behavior 1/3rd > of the time. > > Best regards, > Tyler > > On Mon, Nov 6, 2017 at 6:45 AM, Arie ten Cate <arietenc...@gmail.com> wrote: >> >> Hello Tyler, >> >> You write that you understa

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-11-06 Thread Arie ten Cate
t; does not do anything special for them, and it remains valid, in a trivial > sense, whenever any of the F_j is numeric rather than categorical." Since > F_j refers to both categorical and numeric variables, the behavior of > model.matrix is not consistent with the heuristic. >

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-11-04 Thread Arie ten Cate
ehavior of R does not match the heuristic that > it's citing. > > Best regards, > Tyler > > On Thu, Nov 2, 2017 at 2:51 AM, Arie ten Cate <arietenc...@gmail.com> wrote: >> >> Hello Tyler, >> >> Thank you for searching for, and finding, the basic description

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-11-02 Thread Arie ten Cate
ave demonstrated that this dummy > variable encoding only occurs for the model where the missing term is the > numeric-numeric interaction, "~(X1+X2+X3)^3-X1:X2". Otherwise, the > interaction term X1:X2:X3 is encoded by contrasts, not dummy variables. This > is inconsistent w

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-10-27 Thread Arie ten Cate
1 1 0 0 1 0 > 4 1 1 0 0 -1 0 > 5 1 0 1 0 0 1 > 6 1 0 1 0 0 -1 > >> solve(t(mm) %*% mm) > Error in solve.default(t(mm) %*% mm) : system is computationally singular: >

Re: [Rd] Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing

2017-10-14 Thread Arie ten Cate
I think it is not a bug. It is a general property of interactions. This property is best observed if all variables are factors (qualitative). For example, you have three variables (factors). You ask for as many interactions as possible, except an interaction term between two particular variables.

Re: [Rd] Discourage the weights= option of lm with summarized data

2017-10-12 Thread Arie ten Cate
s like > > y <- c(0,1) > w <- c(49,51) > glm(y~1, weights=w, family=binomial) > > -pd > >> On 9 Oct 2017, at 07:58 , Arie ten Cate <arietenc...@gmail.com> wrote: >> >> Yes. Thank you; I should have quoted it. >> I suggest to re

Re: [Rd] Discourage the weights= option of lm with summarized data

2017-10-08 Thread Arie ten Cate
the point you were > trying to make. > > Best, > Wolfgang > > -Original Message- > From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of Arie ten > Cate > Sent: Sunday, 08 October, 2017 14:55 > To: r-devel@r-project.org > Subject: [Rd] Disc

[Rd] Discourage the weights= option of lm with summarized data

2017-10-08 Thread Arie ten Cate
the first three observations have variance sigma^2). Best, Wolfgang -Original Message- From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of Arie ten Cate Sent: Saturday, 07 October, 2017 9:36 To: r-devel@r-project.org Subject: [Rd] Discourage the weights= option of lm

[Rd] Discourage the weights= option of lm with summarized data

2017-10-07 Thread Arie ten Cate
In the Details section of lm (linear models) in the Reference manual, it is suggested to use the weights= option for summarized data. This must be discouraged rather than encouraged. The motivation for this is as follows. With summarized data the standard errors get smaller with increasing