search for: printcoefmat

Displaying 20 results from an estimated 48 matches for "printcoefmat".

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 <-...
2023 Jul 07
1
printCoefmat() and zap.ind
>>>>> Shu Fai Cheung >>>>> on Thu, 6 Jul 2023 17:14:27 +0800 writes: > Hi All, > I would like to ask two questions about printCoefmat(). Good... this function, originally named print.coefmat(), is 25 years old (in R) now: -------------------------------------------------------------------- r1902 | maechler | 1998-08-14 19:19:05 +0200 (Fri, 14 Aug 1998) | Changed paths: M R-0-62-patches/CHANGES M R-0-62-patches/s...
2012 Dec 14
1
format.pval () and printCoefmat ()
Hi List, My goal is to force R not to print in scientific notation in the sixth column (rel_diff - for the p-value) of my data frame (not a matrix). I have used the format.pval () and printCoefmat () functions on the data frame. The R script is appended below. This issue is that use of the format.pval () and printCoefmat () functions on the data frame gives me the desired results, but coerces the character string into NAs for the two character variables, because my object is a data frame, n...
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(&quo...
2010 Nov 19
0
printCoefmat() for a data.frame with factors
I want to use something like printCoefmat() in a print.summary method to print a more nicely formatted version of the result from a summary method, but where the estimates may be cross-classified by one or more factors. However, printCoefmat() assumes that the labels for the parameters are the rownames of the object, and prints factors...
2023 Oct 29
1
The argument 'eps.Pvalue' of `printCoefmat()`
On 29/10/2023 3:48 a.m., Shu Fai Cheung wrote: > Hi all, > > Just a minor issue that I am not sure whether this is considered a > "bug." It is about the help page. > > In the help page of printCoefmat(), for the argument 'eps.Pvalue', the > description is as below: > > number, .. > > I have to read the source to figure out that this argument is to be > used by format.pval(). > > Maybe the description of 'eps.Pvalue' can be revised to refer users to >...
2004 Nov 20
3
How to change the significant codes default?
Dear R experts, I am posting this question on behalf of a Japanese R user who wants to know how to change the siginificant codes default. As you know, R's default significant codes are: Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 But he says that it is usual in economics to give codes such as `***' for 0.01, `**' for 0.05 and `*' for
2006 Nov 30
1
printing coefficients with text
I want to print the coefficient estimates of a model in a way as consistent with other output in R as possible. stats provides the printCoefmat function for doing this, but there is one problem. I have an additional piece of textual information I want to put on the line with the other info on each coefficient. The documentation for printCoefmat says the first argument must be numeric, which seems to rule this out. I just realized I migh...
2023 Oct 29
1
The argument 'eps.Pvalue' of `printCoefmat()`
Hi all, Just a minor issue that I am not sure whether this is considered a "bug." It is about the help page. In the help page of printCoefmat(), for the argument 'eps.Pvalue', the description is as below: number, .. I have to read the source to figure out that this argument is to be used by format.pval(). Maybe the description of 'eps.Pvalue' can be revised to refer users to the help page of format.pval()? Regards, Sh...
2005 Aug 27
1
printCoefmat with more p-values?
Dear useRs, I would like to summarize results of several tests in groups of two columns - statistic, p-value, statistic, p-value etc. There would be nice to add significance stars, but printCoefmat allows to do it only to last column. Is there any way to do format such table without writing my own complicated function? Thank you in advance, -- Lukasz Komsta Department of Medicinal Chemistry Medical University of Lublin Jaczewskiego 4, 20-090 Lublin, Poland Fax +48 81 7425165
2007 Mar 09
2
understanding print.summary.lm and perhaps print/show in general
...ay but I want to change a few things in the print method that I think I might just be able to do. One is that I want the coefficients table to print a different header (other than "Std. Error"). I've tried changing the column name of the summary$coef matrix and this works for calls to printCoefmat but it still prints out "Std. Error" when I pass the summary.lm to the command line by itself. I don't understand this behavior. When I do this (enter an object on the command line by itself), does it then calls the print / show method associated with that objects class, in this case...
2011 Nov 24
1
pairs(), expression in label and color in text.panel
...usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.5/strwidth(txt) test <- cor.test(x,y) # borrowed from printCoefmat Signif <- symnum(test$p.value, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), symbols = c("***", "**", "*", ".", " ")) text(0.5, 0.5, paste(txt,Signif), cex = 2) } #correlation pair plot pairs(df, labels=c(expre...
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
...pperB) Hessian<-hessian(llh,fit$par) se.coef = sqrt(diag(solve(Hessian))) tval = fit$par/se.coef 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|)")) printCoefmat(matcoef, digits = 6, signif.stars = TRUE) }
2010 Jul 14
1
Add Significance Codes to Data Frame
I was hoping that there might be some way to attach significance code like the ones from summary.lm to a dataframe. Anyone know how to do something like that. Here is the function i'd like to add that functionality to: add1.coef <- function(model,scope,test="F",p.value=1,order.by.p=FALSE) { num <- length(model$coefficients) add <- add1(model,scope,test=test) sub <-
2009 Nov 08
1
Summary methods
...print.summary.jml <- function(x, ...){ cat("Call:\n") print(x$call) cat("\n") cat("Number of iterations to completion:", x$iter, "\n") cat("Number of individuals used in estimation:", x$N, "\n") cat("\n") printCoefmat(x$coefficients) } Use of the methods on a fitted jml object yields: > summary(aa) Call: jml2.formula(formula = ~V1 + V2 + V3 + V4 + V5 + V6 + V7 + V8 + V9 + V10, data = itemDat, bias = F) Number of iterations to completion: 6 Number of individuals used in estimation: 486...
2011 Jan 11
1
Postscript function Bug at R x64 2.12.1?
....exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.8/strwidth(txt) test <- cor.test(x,y) # borrowed from printCoefmat Signif <- symnum(test$p.value, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), symbols = c("***", "**", "*", ".", " ")) text(0.5, 0.5, txt, cex = cex * r) text(.8,...
2011 Oct 30
1
Normality tests on groups of rows in a data frame, grouped based on content in other columns
...functions are applied on several columns instead of certain rows in one column. DF <- data.frame(A = rnorm(100), B = rlnorm(100)) obj2 <- lapply(DF, shapiro.test) tab2 <- lapply(obj, function(x) c(W = unname(x$statistic), p.value = x$p.value)) tab2 <- data.frame(do.call(rbind, tab2)) printCoefmat(tab2, has.Pvalue = TRUE) Finally, I have found several different functions for testing for normality, but which one(s) should I choose? As far as I can see in the help files they only differ in the minimum number of samples required. Thanks in advance! Kind regards, Joel [[alternative HT...
2013 Feb 14
2
Plotting survival curves after multiple imputation
...t(abs(tval), df, lower.tail = FALSE) coefmat <- cbind(est, se, tval, pval) colnames(coefmat) <- c("Estimate", "Std. Error", "t value", "Pr(>|t|)") cat("\nCoefficients:\n") printCoefmat( coefmat, P.values=T, has.Pvalue=T, signif.legend=T ) cat("\nFraction of information about the coefficients missing due to nonresponse:","\n") print(object$f) ans <- list( coefficients=coefmat, df=df,...
2007 Mar 16
1
Create coef.table as in summary.glm (with Signif. codes)
Hi, how do I create a coef.table as for example returned by summary.glm? I don't see where the significance codes are assigned during summary.glm. Thank you, Benjamin
2012 Apr 10
0
Scatterplot matrix with partly transformed axis
...usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.5/strwidth(txt) test <- cor.test(x,y) # borrowed from printCoefmat Signif <- symnum(test$p.value, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), symbols = c("***", "**", "*", ".", " ")) text(0.5, 0.5, paste(txt,Signif), cex = 2) } # Test with data data(iris) pairs(iris[1:3], lo...