search for: getxlevels

Displaying 5 results from an estimated 5 matches for "getxlevels".

2018 Dec 19
0
logical variables in models
...] "A" "B" ?C" - - - - snip- - - - - Why the discrepancy? It?s true that the level-set (i.e., TRUE, FALSE) for a logical ?factor? is known, but examining the $levels component is a simple way to detect variables treated as factors in the model. For example, I?d argue that .getXlevels() returns misleading information: - - - - snip- - - - - > .getXlevels(terms(mod), model.frame(mod)) $c [1] "a" "b" "c" $f [1] "A" "B" ?C" - - - - snip- - - - - An alternative for detecting ?factors? is to examine the 'contrasts'...
2019 Aug 30
3
inconsistent handling of factor, character, and logical predictors in lm()
..."setosa"), data = iris) Coefficients: (Intercept) Sepal.Width I(Species == "setosa")TRUE 3.5571 0.9418 -1.7797 ------------ snip -------------- I believe that the culprit is .getXlevels(), which makes provision for factor and character predictors but not for logical predictors: ------------ snip -------------- > .getXlevels function (Terms, m) { xvars <- vapply(attr(Terms, "variables"), deparse2, "")[-1L] if ((yvar <- attr(Terms, &q...
2008 Nov 28
2
AIC function and Step function
I would like to figure out the equations for calculating "AIC" in both "step() function" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k *
2007 Oct 03
1
R-2.6.0 is released
...paths on all interfaces (they used to on some and not others). o The find() argument is now named 'numeric' and not 'numeric.': the latter was needed to avoid warnings about name clashes many years ago, but partial matching was used. o stats:::.getXlevels() confines attention to factors since some users expected R to treat unclass(<a factor>) as a numeric vector. o grep(), strsplit() and friends now warn if incompatible sets of options are used, instead of silently using the documented priority. o...
2007 Oct 03
1
R-2.6.0 is released
...paths on all interfaces (they used to on some and not others). o The find() argument is now named 'numeric' and not 'numeric.': the latter was needed to avoid warnings about name clashes many years ago, but partial matching was used. o stats:::.getXlevels() confines attention to factors since some users expected R to treat unclass(<a factor>) as a numeric vector. o grep(), strsplit() and friends now warn if incompatible sets of options are used, instead of silently using the documented priority. o...