search for: camarda

Displaying 20 results from an estimated 28 matches for "camarda".

Did you mean: camara
2013 Apr 19
3
extracting the diagonal of an inverse matrix
...e the matrix A as follows: A <- D + P where D is a diagonal matrix. I read there are methods around, but, before implementing one of them by myself, could you please inform whether there is already an R-routine for this issue? Thanks in advance for the help you could provide, Carlo Giovanni Camarda ---------- This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header...
2006 Jul 28
2
Extracting from a matrix w/o for-loop
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060728/957eb23c/attachment.pl
2006 Jan 30
3
Subsetting a matrix without for-loop
Dear R-users, I'm struggling in R in order to "squeeze" a matrix without using a for-loop. Although my case is a bit more complex, the following example should help you to understand what I would like to do, but without the slow for-loop. Thanks in advance, Carlo Giovanni Camarda A <- matrix(1:54, ncol=6) # my original matrix A.new <- matrix(nrow=3, ncol=6) # a new matrix which I'll fill # for-loop for(i in 1:nrow(A.new)){ B <- A[i:(i+2), ] # selecting the rows C <- apply(B,2,sum) # summing by columns A.new[i,] <- C # inserting...
2009 Apr 08
1
persp3d and rgl.viewpoint for rotating 3D plots
...nt behavior between shade3d and persp3d? Please find below a simple example. Actually, my final aim is to save each of the rotating graphs for creating a "clip". I commented below what I would use later on, but is there any way to do it better? Thanks a lot for your help, Carlo Giovanni Camarda library(rgl) # simplified version from help(rgl.viewpoint) shade3d(oh3d()) coo <- 1:360 for(i in 1:length(coo)) { rgl.viewpoint(coo[i]) #filename <- paste("pic", formatC(i,digits=1,flag="00"), ".png", sep="") #rgl.snapshot(filename) } # s...
2009 Mar 19
1
two plots side-by-side with persp3d(rgl)
...have something like "par(mfrow=c(1,2))" for basic plots, or an array framework for wireframe(lattice) (see example below). I only managed to overlap two persp3d plots. My final idea would be to animate both surfaces using play3d(rgl). Thanks in advance for any help. Best, Carlo Giovanni Camarda # simple datasets x <- seq(-10, 10, length= 30) y <- x f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z1 <- outer(x, y, f) z1[is.na(z1)] <- 1 z2 <- matrix(outer(1:30, 1:30)/200, 30, 30) # simple persp par(mfrow=c(1,2)) persp(x, y, z1) persp(x, y, z2) # wireframe l...
2005 May 15
1
Save parameters from optim during iteration procedure
...ot;L-BFGS-B"), control=c(trace=6) ) ######### what I would need to save [...] X = -0.292893 0.292893 [...] X = 0.0942275 -0.0942275 [...] X = -0.00110391 0.00110391 [...] X = 1.93949e-006 -1.93949e-006 [...] X = -4.98008e-013 4.98008e-013 [...] Thanks in advance, Carlo Giovanni Camarda Camarda Carlo Giovanni Max Planck Institute for Demographic Research Konrad-Zuse-Strasse 1 18057 Rostock, Germany Tel: +49 (0)381 2081 172 Fax: +49 (0)381 2081 472 Camarda@demogr.mpg.de +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2006 May 16
1
optim with specific constraints on possible values
...ect.function, from=cbind(possible1, possible2,..., possible13)) Instead of just: optim(par=rep(median(possible1), 13), fn=my.object.function, method=c("L-BFGS-B"), lower=rep(min(possible1), 13), upper=rep(min(possible1), 13)) Thanks in advance, Carlo Giovanni Camarda =========================================== Camarda Carlo Giovanni PhD-Student Max Planck Institute for Demographic Research Konrad-Zuse-Strasse 1 18057 Rostock, Germany Tel: +49 (0)381 2081 172 Fax: +49 (0)381 2081 472 camarda@demogr.mpg.de =========================================== ---------...
2004 Jul 30
1
optimisation procedure with flat log-likelihood
...now the "real" parameters as I have used simulated data (which have been also found by using GAUSS and replicated by it). I already tried various methods and also various starting values but it did not help. Can maybe anyone give me some suggestion what I could do? Thanks, Carlo Giovanni Camarda +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2005 Jun 14
2
Plotting rows (or columns) from a matrix in different graphs, not using "par"
...abels=T) axis(side=2, tick=T, labels=T) plot(y, mat[4,], ylim=c(1,1000), axes=F, xlab="years", ylab="") box() axis(side=1, tick=T, labels=T) ########### END EXAMPLE ######################## Naturally something more compact would be even nicer. Thanks in advance, Carlo Giovanni Camarda +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2004 Aug 30
3
Generalized Singular Value Decomposition (GSVD)
Dear R-users, I couldn't find a function or some help in R-project web about the Generalized Singular Value Decomposition. In MatLab there is a simple function for this algebric issue (gsvd). Is there anything like that in R? And, if not, could you help me to apply this method in R? Thanks in advance, Giancarlo +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2008 Feb 26
2
Summing up diagonals w/o for-loop
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080226/43b3a38b/attachment.pl
2005 Oct 12
1
Historical England and Wales Shape Files
...tics on some historical data, in particular from 1850 to 1900 by registration district of England and Wales. I have searched in the R-archive, but unsuccessfully. Do you know whether R contains those shape files? Or where would be possible to download and use in R? Thanks in advance, Carlo Giovanni Camarda +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
2010 Sep 29
1
generalized additive mixed models for ordinal data
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100929/bedab79b/attachment.pl>
2012 Oct 26
1
matrix algebra for constructing a special matrix?
Dear R-users, would it be a better way to construct the matrix below without using any for-loop or model.matrix? preferably with some matrix algebra? Thanks in advance, Carlo Giovanni Camarda ## dimensions m <- 3 n <- 4 mn <- m*n k <- m+n-1 ## with a for-loop X <- matrix(0, mn, k) for(i in 1:n){ wr <- 1:m+(i-1)*m wc <- rev(1:m+(i-1)) where <- cbind(wr,wc) X[where] <- 1 } ## using model.matrix ff <- factor(c(outer(m:1, seq(0,m), "+")))...
2006 May 09
2
draw a graphic using segments to represent data
Hello, I'd like to draw a graphic using different color line segments to represent microarray data. It simply likes this: Data=cbind(c(1, 2, -1, 3, -2.2), c(1, 3, -1, -1.8, 4)) The first col No represents y'axis position (negative down and positive up). The second col No represents a length of segment (negative segment should be on left of y, and positive on right). Also the
2005 Oct 18
1
Solid and dotted lines saving an xyplot
...would a small problem saving a graph with postscript after using xyplot. Whereas in the R-screen the two lines are solid, once the image is saved as .eps file the second lines (blue in the following example) is dotted. Here there is a simple example. Thanks in advance for your help, Carlo Giovanni Camarda # creating data a1 <- sort(runif(10)) a2 <- sort(runif(10)) a3 <- sort(runif(10)) a4 <- sort(runif(10)) a <- c(a1,a2,a3,a4) b1 <- sort(runif(10)) b2 <- sort(runif(10)) b3 <- sort(runif(10)) b4 <- sort(runif(10)) b <- c(b1,b2,b3,b4) c <- rep(1:10,4) d <- rep(1:4,...
2006 Apr 28
2
How to get a grid behind a boxplot
I am using R 2.2.1 on a Windows 2000 PC. When I do a grid() after the boxplot it overprints the boxplot: > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") > grid(nx=NA, ny=NULL) > if I try the panel.first > boxplot(count ~ spray, data = InsectSprays, col = "lightgray", + panel.first=grid(nx=NA, ny=NULL)) > I can see the grid flash
2009 Mar 11
1
matrix multiplication, tensor product, block-diagonal and fast computation
...trix by the vectorized version of the first matrix. Here, often, the block-diagonal matrix may be too large and a specific list is needed (at least AFAIK). Does anyone have a further and possibly more effective way of computing such operation? Thanks in advance for any suggestion, Carlo Giovanni Camarda library(tensor) library(Matrix) A <- array(seq(0,1,length=48), dim=c(4,4,3)) M <- matrix(1:12, nrow=4, ncol=3) # first solution (avoid the for-loop) M1 <- matrix(nrow=4, ncol=3) for(i in 1:3){ M1[,i] <- A[,,i] %*% M[,i] } # second solution (direct picking of the right cols) A1 &l...
2012 Apr 05
1
xyplot with different pch and col in each panel and additional line
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120405/be19cc65/attachment.ksh>
2006 Feb 01
1
glm-logistic on discrete-time methods with individual and aggregated data
...nd aggregated dataset in the first example, I noted some discrepancies in the second example. I might guess that something with weights is going on, but I did not manage to clearly understand. Hope that the following example will be more clear than my explanations, Thanks in advance, Carlo Giovanni Camarda rm(list = ls()) # working one timesIND <- c(rep(1:4, 3), 1, rep(1:2,2), rep(1:3 , 2), rep(1:4, 2)) statusIND <- c(rep(0 ,12), 1, rep(0:1,2), rep(c(0,0,1), 2), rep(c(0,0,0,1),2)) datiIND <- as.data.frame(cbind(timesIND, statusIND)) datiIND$timesIND <- as.factor(datiIND$timesIND)...