search for: triangular

Displaying 20 results from an estimated 192 matches for "triangular".

2012 May 16
3
triangular matrices input/output
Hi, Is there any package that deals with triangular matrices? Say ways of inputting an upper (lower) triangular matrix? Or convert a vector of length 6 to an upper (lower) triangular matrix (by row/column)? Thanks! ----- ###################### PhD candidate in Statistics Big R Fan Big LEGO Fan Big sTaTs Fan ###################### -- View this m...
2009 Sep 12
2
Triangular distribution for kernel regression
Hello, I am trying to get fitted/estimated values using kernel regression and a triangular kernel. I have found packages that easily fit values from a kernel regression (e.g. ksmooth) but do not have a triangular distribution option, and density estimators that have triangular distribution options that I can't seem to use to produce estimated values (e.g. density). Any help is appr...
2011 May 13
2
How to store a triangular matrix
Hello, I want to create a triangular matrix and only keep the lower triangle entries without having to allocate memory for the whole matrix, is there any way I can do something like  A<-matrix(data, nrow=50)  but for a triangular matrix? Thanks ERV [[alternative HTML version deleted]]
2010 Dec 22
2
Fitting a Triangular Distribution to Bivariate Data
Hello, I have some xy data which clearly shows a non-monotonic, peaked triangular trend. You can get an idea of what it looks like with: x<-1:20 y<-c(2*x[1:10]+1,-2*x[11:20]+42) I've tried fitting a quadratic, but it just doesn't the data-structure with the break point adequately. Is there anyway to fit a triangular or 'tent' function to my data in R? So...
2011 Nov 15
1
Convert full matrix back to lower triangular matrix
Given a vector;> ab = seq(0.5,1, by=0.1)> ab[1] 0.5 0.6 0.7 0.8 0.9 1.0 The euclidean distance between the vector elements is given by the lower triangular matrix > dd1 = dist(ab,"euclidean")> dd1    1   2   3   4   52 0.1                3 0.2 0.1            4 0.3 0.2 0.1        5 0.4 0.3 0.2 0.1    6 0.5 0.4 0.3 0.2 0.1 Convert the lower triangular matrix to a full matrix> ddm = as.matrix(dd1)> ddm    1   2   3   4   5   61 0.0...
2011 Nov 15
5
Convert back to lower triangular matrix
Given a vector;> ab = seq(0.5,1, by=0.1)> ab[1] 0.5 0.6 0.7 0.8 0.9 1.0 The euclidean distance between the vector elements is given by the lower triangular matrix > dd1 = dist(ab,"euclidean")> dd1    1   2   3   4   52 0.1                3 0.2 0.1            4 0.3 0.2 0.1        5 0.4 0.3 0.2 0.1    6 0.5 0.4 0.3 0.2 0.1 Convert the lower triangular matrix to a full matrix> ddm = as.matrix(dd1)> ddm    1   2   3   4   5   61 0.0...
2012 Feb 15
3
built a lower triangular matrix from dataframe
Hello! I'm trying to build a lower triangular matrix (with zeros in the diagonal) from a particular dataframe. The matrix I have to construct has 203 rows and 203 columns and that makes 20503 values to be included within (that's why I can't do it manually). To illustrate the dataframe I have, I'll give you an example of a datafr...
2006 Apr 03
2
Ternary or Triangular Plots (soil texture triangle plot)?
Hi, I am trying to create a triangular plot to show the 'composition' of a set of items with three variables (historically the percent sand, silt and clay in soil). So far I have tried the 'soil texture triangle plot' in the package plotrix and the 'ternary or triangular plots' in the package cwhtool (cwhmis...
2005 Mar 01
2
almost lower triangular matrices
I have output from a program which produces a distance matrix I want to read into a clustering program in R. The output is a .txt file and is 'almost' lower triangular in the sense that it is just the triangle below the diagonal. So for example a 4-by-4 distance matrix appears as, 1 2 3 4 5 6 i.e. it looks like a lower triangular of a 3-by3. I thought I might be able to use "diag" to add zeros but apparently not. It's a problem...
2010 Feb 16
3
Triangular filled contour plot
Hi all, I am working on a filled contour plot which shows a triangular matrix data set (as shown below). Is there a possibilty to draw a triangular filled contour in a equilateral triangle (like a ternary plot)? Thanks in advance Johannes http://n4.nabble.com/file/n1557386/Bild3.png -- View this message in context: http://n4.nabble.com/Triangular-filled-contour-p...
2005 Oct 02
2
convering upper triangular matrix into vector
Hi I have two symmetrical distance matrices and want to compute the correlation coefficient between them (after turning them into vectors). Is there a way of selecting only the upper triangular part of each matrix, then convert this into a vector so I can compute the correlation? Many Thanks Eleni Rapsomaniki
2013 Jun 16
1
trying to fit a thin plate spline to a triangular plot
Hi Has anyone tried to fit a thin plate spine to a triangular plot before? I'm having trouble working out a piece of code to make it possible with three axes. I have done it before with two axes. I've found a package I prefer that makes triangular plots (plotrix) using the triax.plot() function. An example of some data and the plot follows: graph.d...
2001 Jan 09
2
PAM clustering (using triangular matrix)
Hi, I'm trying to use a similarity matrix (triangular) as input for pam() or fanny() clustering algorithms. The problem is that this algorithms can only accept a dissimilarity matrix, normally generated by daisy(). However, daisy only accept 'data matrix or dataframe. Dissimilarities will be computed between the rows of x'. Is there any way t...
2009 Feb 11
4
Efficent way to create an nxn upper triangular matrix of one's
The code below create an nxn upper triangular matrix of one's. I'm stuck on finding a more efficient vectorized way - Thanks. --Dale n <- 9 data <- matrix(data=NA, nrow=n, ncol=n) data for (i in 1:n) { data[,i] <- c(rep(1,i), rep(0,n-i)) } data
2011 Sep 26
2
Triangular matrix upper to down
Hi, suppose that we have a triangular upper matrix A test <- matrix(ncol = 4, nrow = 4) test[1, ] <- c(NA,1,1,1) test[2, ] <- c(NA,NA,1,1) test[3, ] <- c(NA,NA,NA,1) test[4, ] <- c(NA,NA,NA,NA) I know how quickly set diagonal value diag(test) <- 1. But how quickly set down value i.e. matrix is symmetrical? Is th...
2002 Dec 09
0
triangular PDF
Howdy, I couldn't find any way to generate deviates from a triangular PDF in R, so here's a function to do so. -Andy rtri <- function(n=1,min=0,max=1,ml=0.5) { # Return independent random deviates from a # triangular distribution. # n is number of deviates requested # min, max are lower and upper limits of r.v. range # ml is the...
2011 Nov 28
2
Principal componet plot from lower triangular matrix file
...,2]) text(pca2$scores[,1],pca2$scores[,2],rownames(nba_matrix), cex=0.5, pos=1) This time, I don't have a complete file. So, I was wondering, how to do this ? Any help is much appreciated TIA M -- View this message in context: http://r.789695.n4.nabble.com/Principal-componet-plot-from-lower-triangular-matrix-file-tp4114840p4114840.html Sent from the R help mailing list archive at Nabble.com.
2005 Jul 12
2
simple question: reading lower triangular matrix
Dear list, I will like to learn how to read a lower triangular matrix in R. The input file *.txt have the following format: A B C D E A 0 B 1 0 C 2 5 0 D 3 6 8 0 E 4 7 9 10 0 How this can be done? Thanks in advance for your help Rog??rio
2009 Mar 27
3
about the Choleski factorization
Hi there, Given a positive definite symmetric matrix, I can use chol(x) to obtain U where U is upper triangular and x=U'U. For example, x=matrix(c(5,1,2,1,3,1,2,1,4),3,3) U=chol(x) U # [,1] [,2] [,3] #[1,] 2.236068 0.4472136 0.8944272 #[2,] 0.000000 1.6733201 0.3585686 #[3,] 0.000000 0.0000000 1.7525492 t(U)%*%U # this is exactly x Does anyone know how to obtain L such that L is low...
2011 Mar 08
1
R Commander QQ Plot with triangular distribution
I am attempting to use the R Commander Graphs Quantile-Comparison functionality on a dataset, to compare with a triangular distribution. I have the package triangle. My question is on the syntax of how to specify the parameters of the theoretical distribution in the Parameters field of the dialog box. For example, the theoretical distribution has min of 3000, max of 5000, mode of 4000. When I enter this info as...