matrix

  1. H

    Relation algebra - matrix construction

    Hi, In a DEA-software I have, I must construct logical weights. These weights are constructed as a matrix solution of relationships between the variables. In the DEA analysis, the weights are used as restrictions in the linear programming. Lets say I have 5 variables (X1,X2,Z1,Z2,Z3), and...
  2. S

    applying a matrix function on subtables

    Hello all I have recently come across a new free software with table functions at stackoverflow.com: http://finaquant.com/products/finaquantprotos With the so called subtable transformer of this .net library it is possible to apply a table or matrix function on all subtables of an input...
  3. B

    SUMPRODUCT like function in R?

    What is the equivalent to the SUMPRODUCT function in Excel. I am sure there is but I only been using R sporadically for a few months and have never messed around with matrices. Let's say I want to do something like this. There a two soccer games tomorrow and I want to know the chance that...
  4. G

    Script searching data in a kinship matrix

    Hello everybody, in a case-control study I have sampled cases stratifying for sex (0,1) and age (=62y). I need to sample a group of controls with the same characteristics (which I have already done) plus one more: the level of relatedness. In particular I need that controls are as least as...
  5. C

    Input data for a GAM

    Hi there, I am trying to use a GAM (with the mgcv package) to look at species abundance. I have created a data frame for input into the model but the model will not pick up the column headers when I create my function. This also spawns the error message 'object is not a matrix'. I have also...
  6. S

    Help! I'm so lost with this one!

    I've tried to see if I can find examples of this question to help me, but I can't please help. The top four teams in the Big West Hockey Leagues have just completed the first half of their season. Each team has played 20 games. The teams statistics are listed in the following table. Each team...
  7. M

    spline regression - plynomial coefficients

    Hello, I have a problem with spline regreession in R. Suppose following: library(splines) K=c(14,20) plot(cars) reg=lm(dist~bs(speed,knots=c(K), degree=2),data=cars) Is it possible to get (somehow) spline coefficients? I would like to obtain something like this: for 0<speed<14 ...
  8. F

    assist in design matrix,contrast matrix using limma

    Hi all, I'd really appreciate if someone can explain to me whether I've taken the following steps correctly. I'm trying to find the difference in gene expression between (wt vs mutant) for illumina mouse data(MouseWG-6 v2.0 chip). I used a design and contrast matrix (although i'm not sure...
  9. D

    Simple histogram from a 20*2 matrix

    Would you point me in the right direction and correct me in what I have bungled? From a 20*2 matrix I must put the first 8 columns as a histogram on a graph, using a 2 by 4 matrix. This is what I have so far. histogram<- matrix(data,2,20) hist(histogram,4,2)
  10. R

    Observations with probability in R

    Hello, please assist me in answering the following question involving R code and statistics. Loop through CoinTosses<-matrix(nrow=5000,ncol=20) to simulate for each column, 50 coin tosses where a toss has a probability of heads, from 0.05 to 1 probability in each column respectively. Coin...
  11. J

    Why does the determinant always equal zero for a matrix of consecutive numbers?

    Hi. Why does the determinant always equal zero for a matrix of consecutive numbers? This applies whether the consecutive numbers are in the matrix starting from smallest to largest, or vice versa. It also applies irrespective of whether they are entered row then column or vice versa, which...
  12. N

    How to rank (overall) correlation of variables within a correlation matrix

    Hello, I have six correlation matrices in an Excel spreadsheet. Each has the same variables but reports on a different group. I would like to rank the variables across all groups from least correlated to most correlated. There are 8 variables: ENNMN.r CONTAG.r LSI.r ED.r PAFRAC.r...
  13. N

    How to use a Distance Matrix as an Independent Variable?

    Hello, Let's say I have 100 locations. I know the distance between each location (i.e. distance matrix). How can I use the distance matrix (or some derivative) as an independent variable to access significance (if any) with the dependent/response variable(s)? Any ideas? Thanks,
  14. P

    Unlist command drops all my column names in the first row and adopts NAs

    Hi Everyone, I am having trouble turning my data.frame into a matrix format. Because I wanted to change my data.frame with mostly factor variables into a numeric matrix, I used the following code --> UN2010frame<-data.matrix(lapply(UN2010,as.numeric)) However when i checked the mode of...