search for: signific

Displaying 20 results from an estimated 1264 matches for "signific".

Did you mean: significa
2005 Jan 19
2
signif() generic
Dear list, I'm trying to write a class for Gaussian error propagation of measured values and their (estimated) errors, > setClass("sec", representation(val="numeric", err="numeric")) I've already successfully implemented basic arithmetics using mostly the "Arith" group generics. But I'm running into trouble when trying to get signif() to
2005 Apr 21
1
printCoefmat(signif.legend =FALSE) (PR#7802)
printCoefmat(signif.legend =FALSE) does not work properly. The option "signif.legend = FALSE" is ignored as shown in the example below. cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12))) cmat <- cbind(cmat, cmat[,1]/cmat[,2]) cmat <- cbind(cmat, 2*pnorm(-cmat[,3])) colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)") #
2003 Mar 14
1
Formatting significant digits with trailing zeros
I need a function like signif(), but returns the rounded values as character strings, formatted with trailing zeros where appropriate. If anyone has one, I would sure appreciate a copy. Thanks -Don Details: signif() rounds a number to a specified number of significant digits, for example: > x <- c(2.503,2.477,0.1204) > signif(x[1],3) [1] 2.5 > signif(x[2],3) [1] 2.48 > signif(x[3],3) [1] 0.12 All of these are correct, numerically. But, the trailing zeros do not display, naturally, because the R functions that format numbers for prin...
2003 Feb 06
1
signif {base}: changes to scientific notation
PROBLEM `signif' does change to scientic notation at different levels depending on the number of significant digits in the input. This can generate tables where figures change ``irregularly'' from normal to scientific notation. PROPOSAL The change to the scientific notation should be made only if the figure in scientific notation - with potentially as many significant dig...
2011 Dec 08
2
Behavior of apply()
Suppose I have the following matrix > class(cov_50) [1] "matrix" > cov_50 [,1] [,2] [1,] 0.3201992 2.308084 [2,] 6.7312928 5.719641 I then use the following function via apply and get the desired output, a list signif <- function(x) which(abs(x) > 1.96) apply(cov_50, 1, signif) > apply(cov_50, 1, signif) [[1]] [1] 2 [[2]] [1] 1 2 However, I can't
2011 Oct 17
1
compressing/reducing data for plot
...slow! (Takes about 4 seconds for each 1e5 element dataframe) * It does not work well if the values increase/decrease monotonically with small values - it will remove them all since the difference between each point and its predecessor is minimal I included my own function below: === cut === get_significant_rows_1 <- function (data, threshold) { # get the difference between each datapoint and the following datapoint # of course this list is one shorter than the input dataset, which does # not matter since the first and last datapoint will always be included diffs = abs(data[1:nrow(data)-1,] - d...
2006 Nov 09
2
Single precision data behaviour with readBin()
Hi all, I am running R version 2.4.0 (2006-10-03) on an i686 pc with Mandrake 10.2 Linux. I was given a binary data file containing single precision numbers that I would like to read into R. In a previous posting, someone suggested reading in such data as double(), which is what I've tried: > zz <- file(file, "rb") > h1 <- readBin(con = zz, what = double(), n = 1, size
2005 Jun 06
6
Strange characters in 2.1.0?
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Signif. codes: 0 <80><98>***<80><99> 0.001 <80><98>**<80><99> 0.01 <80><98>*<80> <99> 0.05 <80><98>.<80><99> 0.1 <80><98> <80><99> 1 Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 hmm... they go away when I
2019 Mar 27
1
default for 'signif.stars'
...e of The American Statistician just came out, and its theme is the [mis]use of P values and the many common ways in which they are abused. The lead editorial in that issue mentions the 2014 ASA guidelines on P values, and goes one step further, by now recommending that the words "statistically significant" and related simplistic interpretations no longer be used. There is much discussion of the problems with drawing "bright lines" concerning P values. This is the position of a US society, but my sense is that the statistical community worldwide is pretty much on the same page. M...
2010 Oct 20
1
rounding up (always)
Hello! I am trying to round the number always up - i.e., whatever the positive number is, I would like it to round it to the closest 10 that is higher than this number, the closest 100 that is higher than this number, etc. For example: x<-3241.388 signif(x,1) rounds to the closest thousand, i.e., to 3,000, but I'd like to get 4,000 instead. signif(x,2) rounds to the closest hundred,
1997 May 27
1
R-alpha: signif( small , d) gives NA
signif(.) is a <primitive> function. Unfortunately, I couldn't even find WHERE in the source, signif(.) is defined. Here are the symptoms: xmin <- .Machine $ double.xmin signif(xmin,3) #--> NA umach <- unlist(.Machine)[paste("double.x", c("min","max"), sep='')] for(dig in 1:10) {cat("dig=",dig,": ");
2005 May 22
3
comparison operator, decimals, and signif()
Hi, I recently spent quite a bit of time trouble shooting a function that I had written only to discover that the problem I was having was with the comparison operator. I assumed that the following would return TRUE: > testMean <- 82.8 + 0.1 > testMean [1] 82.9 > testMean == 82.9 [1] FALSE Apparently this has to do with deciml places. Look: > newTest <- 82.0 > newTest [1]
2009 Dec 21
3
Signif. codes
...> day.f5 0.02174 0.84843 0.026 0.980 > > day.f6 -0.15217 0.84843 -0.179 0.858 > > day.f7 0.14986 0.84390 0.178 0.859 > > Does this mean that these numbers have a 0% chance of being wrong? Is there a way to change this to the .05 level of significance? Thanks, John [[alternative HTML version deleted]]
2008 Jun 02
6
significant digits (PR#9682)
...with vectors: > sapply(c(1:6),function(a){signif(c(18.423,0.90),digits=a)}) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 20.0 18.0 18.4 18.42 18.423 18.423 [2,] 0.9 0.9 0.9 0.90 0.900 0.900 Trying to get that and more complicated tables to print the correct number of significant digits gets pretty hairy with sprintf(). I could be wrong, but I would view the primary purpose of rounding to significant digits the printed output of the number. That there doesn't seem to be a way to do this without later having to specify the number of decimal places would seem to render...
2013 Oct 02
0
For numeric x, as.character(x) doesn't always match signif(x, 15)
I saw something like this. > x <- 5180000000000003 > print(x, digits=20) [1] 5180000000000003 > as.character(x) [1] "5.18e+15" I thought it was because, when x is numeric, as.character(x) represents x rounded to 15 significant digits. > print(signif(x, 15), digits=20) [1] 5180000000000000.0000 > as.numeric(as.character(x)) == signif(x, 15) [1] TRUE The documentation for 'as.character' in R states this in "Details" section. 'as.character' represents real and complex numbers to 15...
2008 Feb 01
1
argument order for Math2 group functions in R 2.6.x (PR#10679)
Full_Name: Ben Hansen Version: 2.6.1 OS: Windows Submission from: (NULL) (66.93.3.101) Hi, In R 2.6.0 or 2.6.1 on Windows, I get the following upon opening the GUI (no previous commands or special settings): > signif(digits=4, x=1/3) [1] 4 It seems to be taking 4 to be the "x" argument, the number to be rounded. However, my understanding (perhaps mistaken) was that it should
2002 Feb 28
1
trying to build matrix for tests...
Okay, I stumped. I'm trying to build a matrix or data.frame that consists of values by group. For example, resid, group 574 0.536196370873122 E 575 0.93191093696265 E 576 -1.27116094894117 A 577 -1.05159666055027 A 578 0.398273458301184 D 579 0.586373126102573 E 580 0.806575304513802 E 581 0.897258393118338 E 582 0.342393324256838 D 583 0.781245511773227 E I
2019 Mar 28
0
default for 'signif.stars'
Hi Martin, I take your point - but I'd argue that significance stars are a clumsy solution to the very real problem that you outline, and their inclusion as a default sends a signal about their appropriateness that I would prefer R not to endorse. My preference (to the extent that it matters) would be to see the significance stars be an option but not a d...
2014 Jan 06
1
Signif. codes
My question is about the "Signif. codes" , the output when I run matcoef =cbind(fit$par, se.coef,tval,2*(1-pnorm(abs(tval)))) dimnames(matcoef)=list(names(tval),c("Estimate","Std.Error","t value","pr(>|t|)")) cat("\nCoefficient(s):\n") printCoefmat(matcoef, digits=4, signif.stars = TRUE) Coefficient(s): Estimate
2009 Dec 22
1
Sweave: font problems with Signif. codes lines
[Environment: Win Xp, Miktex 2.7, R 2.9.2] In an Sweave document, I'm displaying the results of car:::Anova() tests, that look like this in the generated .tex file: \begin{Soutput} Type III MANOVA Tests: Pillai test statistic Df test stat approx F num Df den Df Pr(>F) (Intercept) 1 0.86 90.38 4 60 <2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1