search for: arietenc

Displaying 18 results from an estimated 18 matches for "arietenc".

2017 Oct 12
4
Discourage the weights= option of lm with summarized data
...ect this. > > It is of some importance when you put glm() into the mix, because you can in fact get correct results from things 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 <arietencate at gmail.com> wrote: >> >> Yes. Thank you; I should have quoted it. >> I suggest to remove this text or to add the word "not" at the beginning. >> >> Arie >> >> On Sun, Oct 8, 2017 at 4:38 PM, Viechtbauer Wolfgang (SP) >> <wolfga...
2017 Dec 03
1
Discourage the weights= option of lm with summarized data
...al degrees of freedom may > 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 <arietencate at 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 the end of the text a warning; something like: >> >> "Note that in this case...
2017 Nov 06
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
..., 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. > > Best regards, > Tyler > > On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> wrote: >> >> Hello Tyler, >> >> I rephrase my previous mail, as follows: >> >> In 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 exa...
2017 Nov 06
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...his): when there is a missing marginal term in the formula, the higher-order interaction should be coded by dummy variables, regardless of type. Thus, 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 <arietencate at gmail.com> wrote: > Hello Tyler, > > You write that you understand what I am saying. However, I am now at > loss about what exactly is the problem with the behavior of R. Here > is a script which reproduces your experiments with three variables > (excluding the full mod...
2017 Nov 28
0
Discourage the weights= option of lm with summarized data
...ed. Therefore, the sigma estimate and residual degrees of freedom may 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 <arietencate at 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 the end of the text a warning; something like: > > "Note that in this case the standard estimates of...
2017 Nov 04
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...orical." > Factor here is used in the more general sense of the word, not referring to > the R type "factor." The behavior 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 <arietencate at gmail.com> wrote: >> >> Hello Tyler, >> >> Thank you for searching for, and finding, the basic description of the >> behavior of R in this matter. >> >> I think your example is in agreement with the book. >> >> But let me first note the...
2017 Nov 28
0
Discourage the weights= option of lm with summarized data
...t Reference Manual of coxph says that the weights option specifies a vector of case weights, to which is added only: "For a thorough discussion of these see the book by Therneau and Grambsch." Let us repair the other bug also. Arie On Thu, Oct 12, 2017 at 1:48 PM, Arie ten Cate <arietencate at 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 the end of the text a warning; something like: > > "Note that in this case the standard estimates of th...
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...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. Best regards, Tyler On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> wrote: > Hello Tyler, > > I rephrase my previous mail, as follows: > > In 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. Henc...
2017 Nov 02
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...:X2". Otherwise, the > interaction term X1:X2:X3 is encoded by contrasts, not dummy variables. This > is inconsistent with the description of the intended behavior given in the > book. > > Best regards, > Tyler > > > On Fri, Oct 27, 2017 at 2:18 PM, Arie ten Cate <arietencate at gmail.com> > wrote: >> >> Hello Tyler, >> >> I want to bring to your attention the following document: "What >> happens if you omit the main effect in a regression model with an >> interaction?" >> (https://stats.idre.ucla.edu/stata/fa...
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...f the F_j is numeric rather than categorical." Factor here is used in the more general sense of the word, not referring to the R type "factor." The behavior 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 <arietencate at gmail.com> wrote: > Hello Tyler, > > Thank you for searching for, and finding, the basic description of the > behavior of R in this matter. > > I think your example is in agreement with the book. > > But let me first note the following. You write: "F_j refers...
2017 Oct 09
2
Discourage the weights= option of lm with summarized data
Yes. Thank you; I should have quoted it. I suggest to remove this text or to add the word "not" at the beginning. Arie On Sun, Oct 8, 2017 at 4:38 PM, Viechtbauer Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote: > Ah, I think you are referring to this part from ?lm: > > "(including the case that there are w_i observations equal to y_i and
2017 Oct 09
0
Discourage the weights= option of lm with summarized data
...) are wrong. Somehow, the text should reflect this. It is of some importance when you put glm() into the mix, because you can in fact get correct results from things 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 <arietencate at gmail.com> wrote: > > Yes. Thank you; I should have quoted it. > I suggest to remove this text or to add the word "not" at the beginning. > > Arie > > On Sun, Oct 8, 2017 at 4:38 PM, Viechtbauer Wolfgang (SP) > <wolfgang.viechtbauer at maastrichtu...
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...gt; solve(t(mm) %*% mm) > Error in solve.default(t(mm) %*% mm) : system is computationally singular: > reciprocal condition number = 5.55112e-18 > > I still believe this is a bug. > > Best regards, > Tyler Morgan-Wall > > On Sun, Oct 15, 2017 at 1:49 AM, Arie ten Cate <arietencate at gmail.com> > wrote: > >> 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 >&g...
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...umeric interaction, "~(X1+X2+X3)^3-X1:X2". Otherwise, the interaction term X1:X2:X3 is encoded by contrasts, not dummy variables. This is inconsistent with the description of the intended behavior given in the book. Best regards, Tyler On Fri, Oct 27, 2017 at 2:18 PM, Arie ten Cate <arietencate at gmail.com> wrote: > Hello Tyler, > > I want to bring to your attention the following document: "What > happens if you omit the main effect in a regression model with an > interaction?" (https://stats.idre.ucla.edu/stata/faq/what-happens-if-you-o > mit-the-main-...
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: -------------- >
2017 Oct 07
1
Discourage the weights= option of lm with summarized data
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 numbers of observations. However, the standard errors in lm do not get smaller when for instance all weights
2017 Oct 15
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
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. When this interaction is not a constant, it is different for different values of the remaining
2017 Oct 08
2
Discourage the weights= option of lm with summarized data
Indeed: Using 'weights' is not meant to indicate that the same observation is repeated 'n' times. As I showed, this gives erroneous results. Hence I suggested that it is discouraged rather than encouraged in the Details section of lm in the Reference manual. Arie ---Original Message----- On Sat, 7 Oct 2017, wolfgang.viechtbauer at maastrichtuniversity.nl wrote: Using