search for: zaponlysmall

Displaying 2 results from an estimated 2 matches for "zaponlysmall".

2023 Jul 07
1
printCoefmat() and zap.ind
...l() is used. I'm not even sure anymore if I was always aware 1998 what exactly the simple zapsmall() function is doing. It does not do what you want here (and actually *typically* want for formatting numbers for display, plotting, etc): You "really want" here and in such situations zapOnlysmall <- function(x, dig) { x[abs(x) <= 10^-dig] <- 0 x } and I think I'd replace the use of zapsmall() inside printCoefmat() with something like zapOnlysmall() above. This will indeed nicely solve your problem. > Second, how can I use zap without this behavior?...
2023 Jul 06
1
printCoefmat() and zap.ind
Hi All, I would like to ask two questions about printCoefmat(). First, I found a behavior of printCoefmat() that looks strange to me, but I am not sure whether this is an intended behavior: ``` r set.seed(5689417) n <- 10000 x1 <- rnorm(n) x2 <- rnorm(n) y <- .5 * x1 + .6 * x2 + rnorm(n, -0.0002366, .2) dat <- data.frame(x1, x2, y) out <- lm(y ~ x1 + x2, dat) out_summary <-