search for: matrici

Displaying 20 results from an estimated 51 matches for "matrici".

Did you mean: matrice
2012 Sep 24
6
Script to count unique values from two linked matricies
I hope you can help with this one. I have two matricies: 1. A species abundance matrix: <http://r.789695.n4.nabble.com/file/n4643979/2species_matrix.jpg> 2. A species trait score matrix: <http://r.789695.n4.nabble.com/file/n4643979/2trait_matrix.jpg> The trait matrix lists trait scores for each species as listed in the species abund...
2009 Jul 13
4
Combine two matricies
Hi, I have two matricies a and x: a<-matrix(c(3,4,5,2,3,4,1,1,2), nrow=3, ncol=3) [,1] [,2] [,3] [1,] 3 2 1 [2,] 4 3 1 [3,] 5 4 2 x<-matrix(c(3, NA, NA, NA, 2, 5, NA, 2, 2), nrow=3, ncol=3) [,1] [,2] [,3] [1,] 3 NA NA [2,] NA 2 2 [3,] NA 5 2 I wish to combine...
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 these probability values. [A quick s...
2010 May 22
2
Regression with sparse matricies
I would like to run a logistic regression on some factor variables (main effects and eventually an interaction) that are very sparse. I have a moderately large dataset, ~100k observations with 1500 factor levels for one variable (x1) and 600 for another (X2), creating ~19000 levels for the interaction (X1:X2). I would like to take advantage of the sparseness in these factors to avoid using GLM.
2005 Mar 05
2
Bitrate Adaption
Hi, I've been reading through the Theora format spec and API reference trying to find an answer to this but haven't come across anything certain. I'm wondering whether it would be theoretically possible to change the encoded bit rate (or target video qiality) during a live stream without a standard theora decoder having any problems. I had assumed that this must be possible, given
2007 Jul 23
2
cmdscale question
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matricies such as: A B C D E A 0 1 23 12 9 B 1 0 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 3 4 21 0 i.e. matrices which do not represent physical distances between places (as they would not make sense for real distances such as the one above) but other sta...
2010 Mar 22
2
importing .bil files
Dear list Has anyone got a recipie at hand to import .bil files into R? From what I understand the .bil files I got contain layered matricies which I would lke to make available in R as an array or list. GIS people seem to be familiar with the .bil format but I am not using any GIS software and would prefer to deal with the data in R. I use the latest version of R on Mac OSX 10.5.8. Thanks, Sebastian
2012 Oct 18
3
bigmemory for dataframes?
...2 objects, to be specific). I'm searching for a way to cache some of these dataframes and objects to virtual memory (I think I'm using the right terminology...). I've read around, and while bigmemory and ff and the like would likely suit my purposes if I were just dealing with numeric matricies, I'm dealing with dataframes and objects. Any thoughts would be greatly appreciated! Thanks, Allie
2011 Jul 27
2
Use a list to 'transport' a collection of data sets and results
Hi Everybody I need to "transport" some data and results to use another application (Sweave via LyX - where debugging is very difficult) in order to build a report. Is it possible to store a collection of variables of different types (like named integers, matricies, data frames and two lists) all in one list and save it and then simply load it again later and "unpack" the variables. Thanks is advance Christiaan Please see the sample code below. # Create variables of different types x=expand.grid(1:4,letters[1:4]) y=matrix(1:1000,ncol=20) z=l...
2011 Jul 27
2
apply is making me crazy...
...sions of its output. The following example is easier to understand than the question. I wish it had a "drop=TRUE/FALSE" option like the "[" (and I wish I had found the drop option a year ago, and I wish that I had 1e6 dollars... Oops, I mean euros). ## Make three example matricies exampGood = lapply(2:4, function(x)matrix(rnorm(1000*x),ncol=x)) exampBad = lapply(1:3, function(x)matrix(rnorm(1000*x),ncol=x)) ## Two ways to see what was created: for(k in 1:length(exampGood)) print(dim(exampGood[[k]])) for(k in 1:length(exampBad)) print(dim(exampBad[[k]])...
2011 Nov 03
2
Take variables in data.frame and create list of matrices
Hi, I have this sample data below and would like to create a list of matricies. setseed(1254) id <- c(1,1,1,1 ,2,2,2) o <- as.factor(c(1:4, 1, 3, 4)) r <- rep(.5, 7) v <- rnorm(7) s <- rnorm(7) dat <-data.frame(id, o, r, v, s) dat #> dat # id o r v s # 1 1 0.5 0.7024631 2.0813672 # 1 2 0.5 -0.5541955 0.1095156 # 1 3 0.5 -1.0...
2003 Sep 24
1
storing objects (lm results) in an array
Hi I have calculated lots (>1000) of linear models and would like to store each single result as an element of a 3D matrix or a similar storage: something like glm[i][j][k] = lm(...) Since I read that results are lists: Is it possible to define a matrix of type list? Or what do you recommend? Many thanks Christoph -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2006 Apr 19
1
apply(table) miss factor structure
...3 4 5 0 26 1 0 1 0 > table(restr[,"p2"]) 0 1 2 3 4 5 6 0 13 11 1 2 1 0 When I use apply, the factor structure is missed: > apply(restr[,c("p1","p2")], 2, table) $p1 1 2 4 26 1 1 $p2 1 2 3 4 5 13 11 1 2 1 Can I use a matricial (like apply) manner to do this holding the factor structure (the zero-counts must be displayed)? Thanks, Cezar Freitas Unicamp - Brasil
2010 Apr 22
1
Why does 'apply(.., 1, .., ..)' transpose result
I am sorry if this is documented in apply's dcumentation or completely obvious, I could not find or work it out. Given an matricies Q: 2x3, R:1x3 and S:1x2 apply(Q, 1, '-', R) is 3x2 and apply(Q, 2, '-', S) is 2x3 Why? cheers Worik > Q [,1] [,2] [,3] [1,] 1 2 3 [2,] 10 11 12 > R [1] 1 4 7 > S [1] 1 4 > apply(Q, 1, '-', R) [,1] [,2] [1,] 0 9 [2,] -2 7...
2010 Mar 11
1
VAR with contemporaneous effects
Hi, I would like to estimate a VAR of the form: Ay_t = By_t-1 + Cy_t-2 + ... + Dx_t + e_t Where A is a non-diagonal matrix of coefficients, B and C are matricies of coefficients and D is a matrix of coefficients for the exogenous variables. I don't think the package {vars} can do this because I want to include contemporaneous cross-variable impacts. So I want y1_t to affect y2_t and I think in {vars} I can only have y1_t-1 affect y2_t. {vars} wil...
2010 Dec 14
1
Modifying values outside a function using "apply".
I am sure this si a simple problem but the solution is evading me. I have a list of matrices all with the same number of columns but different number of rows. The first two columns label the row. The labels are allways the same for the same row numbers, just some matricies have more rows. For example using 3 column matrices... > q.1 <- function(r){return(cbind(seq(0, 10, by=1)[1:r], seq(10, 30, by=2)[1:r], runif(r)))} > sapply(q, q.1) [[1]] [,1] [,2] [,3] [1,] 0 10 0.5399220 [2,] 1 12 0.1551015 [3,] 2 14 0.9664470 [[2]] [,1...
2009 May 08
2
partial mantel tests "Ecodist"
...ackage instructions I've managed to implement the tests as; var1 ~ env1 + space to partial out the effect of space and test the relationship between the variable of interest vs variable env1. My questions are as follows; 1) can "raw" data be used to construct the dissimilarity matricies? or should they be standardized? different variables have different measurment scales, my inclination is to standardize, but I don't know if this will dampen relationships between variables. 2) If env1 and another variable are correlated, is the appropriate test var1 ~ env1 +...
2003 Jul 31
1
spatial statistics vs. spatial econometrics
...l trends and kriging (e.g., the geoR package); the second along the lines of Anselin's book--spatial lag and spatial-autocorrelation models (e.g., the spdep package). As far as I can tell, these amount to the same thing (in princple). The first camp likes to use row-standardized "weight matricies" in building covariance structures (to ensure there isn't too much dependence?). I find this very unappealing to many models. This camp doesn't seem to look at variograms or correlegrams as often--they just fit the model, which I also find unappealing. The covariance structures al...
2018 Jun 28
2
suma del resultado de multiplicar fila x columna
Buenas tardes, tengo 2 dfs: Dieta de (108x11) y Abund de (591x108). Necesito multiplicar cada columna de la 1ª (108 elementos) por cada fila de la 2ª (108 elementos) y crear una nueva df con las sumas de esas multiplicaciones. He hecho esto, pero no sale y creo que está lejos de estar bien: Res <- matrix(nrow=nrow(Abund),ncol=ncol(Dieta)) Res <- as.data.frame(Res) for(i in
2005 Nov 22
1
SPSS-like factor analysis procedure
...in function cov() does this. Solved. 5. KMO (Kaiser-Meyer-Olkin Measure of Sampling Adequacy) and Bartlett test of sphericity on the data frame as a whole. I can't find ways to recreate these tests -- bartlett.test() doesn't produce the type of response that makes sense. 6. Anti-image matricies, including MSA (sampling adequacy) scores for each variable I can't find a way to generate this, maybe because I'm unsure how its calculated. The MSA scores would tell me how strongly each variable measures the data set as a whole, which I could use to guide subsequent factor anal...