similar to: diag() (PR#555)

Displaying 20 results from an estimated 6000 matches similar to: "diag() (PR#555)"

2013 Oct 09
1
Version of L-BFGS-B used in optim etc
Hi. I just noticed the paper by Morales and Nocedal Remark on "Algorithm 778: L-BFGS-B: Fortran Subroutines for Large-Scale Bound Constrained Optimization". TOMS 2011; 38(1): 7 http://www.ece.northwestern.edu/~morales/PSfiles/acm-remark.pdf which describes a couple of improvements (speed and accuracy) to the original Netlib code which AFAICT is that still used by optim() via f2c.
2001 Nov 01
1
cor.test for a correlation matrix
Is there a simple way to run cor.test on for a matrix of correlations? Of course, cor on a data frame produces a correlation matrix, but cor.test will only take two variables at a time. Is there a way to get behavior similar to that of cor with cor.test? I suppose the programming alternative would be to run two for loops with the number of items and cor test embedded accessing the columns of
2011 May 11
3
Vermunt's LEM in R
I don't know of any R package that can match all the functionality of LEM eg fitting equality constraints to model parameters a la LISREL. WRT dumping tables, I would have thought that as.data.frame.table does pretty much what you want, [not tested] newtab <- as.data.frame(table(a,b,c)) cat("dim\n") for(i in seq(1, ncol(newtab)-1) { cat(nlevels(newtab[,1]," ") }
2000 Jan 04
1
correlation matricies: getting p-values?
I have to admit that I'm at a bit of a loss here; any pointers would be greatly appreciated. I've been making correlation matricies from some of my datasets, and have been instructed to get the probability values for each of these correlations. I've checked the online help for info on both the cor and cov functions, but I was unable to find any relevant info on finding how to obtain
2004 Dec 09
1
Re: Tetrachoric and polychoric correlations, Polycor package
A bit late, but you might like to look at http://www.qimr.edu.au/davidD/polyr.R Regarding the original posters queries: You can analyse polychoric correlations as if they were Pearson correlations using standard software (eg sem), and this usually doesn't do too badly, or go to AWLS (Browne) in LISREL etc, or ML analysis of the full multidimensional contingency table using programs such as
2000 Mar 07
1
A simple question??
Dear all, I'm currently use R v0.99 on Windows 98 Second Edition. I have a question on some simple calculations. I wonder that I've done something wrong with the calculation. Here is the imput commands: > a <- 25.01 > b <- 56.08 > a.trunc <- trunc(a) > b.trunc <- trunc(b) > a.tail <- a - a.trunc > b.tail <- b - b.trunc > a.trunc [1] 25 >
2000 Jul 17
2
sshd -i problem under 2.1.1p4 as well
I have encountered the same problem with sshd -i (under Mandrake linux 6.1) as that described by Ben L Perkins, this time with 2.1.1p4: ... Last login: Mon Jul 17 12:04:50 2000 from orpheus.qimr.edu.au -bash: ?oe90: command not found -bash: glorious: command not found -bash: ?]r90: command not found -bash: marshall4: command not found Connection to orpheus.qimr.edu.au closed. log: Jul 17
2006 Feb 22
1
var-covar matrices comparison
> Date: Mon, 20 Feb 2006 16:43:55 -0600 > From: Aldi Kraja <aldi at wustl.edu> > > Hi, > Using package gclus in R, I have created some graphs that show the > trends within subgroups of data and correlations among 9 variables (v1-v9). > Being interested for more details on these data I have produced also the > var-covar matrices. > Question: From a pair of two
2008 May 21
1
table(factor(x), exclude=NULL) (PR#11494)
Hi. I don't know if this a bug or just annoying to me: > x <- c(1,2,3,NA) > table(x, exclude=NULL) x 1 2 3 <NA> 1 1 1 1 > table(factor(x), exclude=NULL) 1 2 3 1 1 1 I don't think many people use factor(x, exclude=NULL): it is not the default handling of character data by read.table(). Cheers, David Duffy. -- | David Duffy (MBBS PhD)
2000 Feb 03
1
Re: your mail
> On Wed, 2 Feb 2000, Adriane Leal wrote: > > > I'd like to perform a box-cox transformation to a data set and also plot > > lambda versus L(lambda) using R. Does anybody knows how can I do such a > > thing? gnlr3 in my gnlm library does both linear and nonlinear models with Box-Cox transformation. However, it is somewhat nonstandard as it renormalizes to obtain a
2000 Jun 22
1
help
Dear All, Further to answers to sorting, can someone tell me how can I sort a list that contains duplicates (name) but keeping the duplicates together when sorting the values. e.g., a data frame with name (in duplicates), Mvalues(may be different for the duplicates) name M 1234 8 1234 8.3 4321 9 4321 8.1 If I sort by M, it will be 1234, 4321, 1234, 4321 but I want to keep the duplicates together,
2000 May 04
1
logistic regression example from Devore5
I maintain the Devore5 package for R. This package provides the data sets from Jay Devore's text "Probability and Statistics for Engineering and the Sciences (5th ed)". I am having difficulty reproducing some logistic regression results from the textbook. Perhaps this is because I am not using the glm function correctly. The data from Example 13.5 (page 559 for those with a copy
1999 Mar 17
1
hist(list)?
It seems that the following should work: > x<-read.table('1A.tab',header=T,skip=1); > mode(x[1]) [1] "list" > x[1] p01 R1-00 0.0295 R1-01 0.0283 R1-02 0.0145 R1-03 0.0235 R1-04 0.0339 R1-05 0.0239 R1-06 0.0414 R1-07 0.0259 > hist(x[1]) Error: hist: x must be numeric > as.numeric(x[1]) Error: (list) object cannot be coerced to vector type 14 >
2005 Jun 29
2
How to convert "c:\a\b" to "c:/a/b"
I couldn't resist adding a more literal answer unback <- function(x) { chars <- unlist(strsplit(deparse(x),"")) chars <- chars[-c(1,length(chars))] paste(gsub("\\\\","/",chars),collapse="") } unback("\n") | David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph:
2005 Jun 29
2
How to convert "c:\a\b" to "c:/a/b"
I couldn't resist adding a more literal answer unback <- function(x) { chars <- unlist(strsplit(deparse(x),"")) chars <- chars[-c(1,length(chars))] paste(gsub("\\\\","/",chars),collapse="") } unback("\n") | David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph:
2000 Sep 20
1
SV: sample from contingency table
I have had the same problem and I wrote this function rmulti <- function(n, size, p) { NrDim <- length(p) if(NrDim<2) stop("The simulated variabel has to be at least 2-dimensional") res <- matrix(data=NA, nrow=n, ncol=NrDim) p <- p/sum(p) TempSize <- size for(i in 1:NrDim) { TempP <- p[i]/sum(p[i:NrDim]) TempBin <- rbinom(n=n, size=TempSize,
2000 Apr 25
2
Recursive Computation in R
Hi there, I have written a function to calculate factorials as follows: fact <- function(x) { recurse <- x > 1 x[!recurse] <- 1 if( any(recurse) ) { y <- x[recurse] x[recurse] <- y * fact( y - 1 ) } x } I want to be able to do the famous birthday problem, which will involve the computation of 365!, however it shall get cancelled
2001 Mar 30
1
hide body of function
I would like to hide the body of function, when the user types the name of that function. For example, I've created "ff" function (cut/paste from R-plus session): > ff<-function() { a <- 5 } #then, if the user types "ff" > ff function() # This part is shown but I'd like # this body to be # hidden from the user, if possible. {
2000 Aug 14
5
Writing a workable function
After searching in R- Introduction, FAQ, help... I don't understand this: I write a function in a file (.R): tt <- function(mc) { date() mc<-read.csv2("machines.txt",na.strings="") date() } I source it in R and I type tt(). The answer is > tt() [1] "Mon Aug 14 11:18:25 2000" > The instructions following the first "date()" are ignored. Why?
1999 Dec 19
3
CRAN src/contrib/Devel
The `src/contrib/Devel' dir contains *bats* Basic time series modelling functions. *dopt* Finding D-optimal experimental designs. *tcltk* Basic interface with Tcl/Tk. *timeslab* Time series routines. *vtcl* Interface to Visual Tcl. which have all been there for a long time. What is the current status, is any of the above getting ready for being moved into