search for: nxk

Displaying 7 results from an estimated 7 matches for "nxk".

Did you mean: nx
2009 Jan 19
2
Using apply to generate matrix from rows?
Dear all, I have a simple question which I unfortunately do not seem to be able to solve myself. I have a (NxK) matrix and want to generate a new matrix by multiplying each row with itself such that the new matrix has dimension ((N*K)xK) (or better, generate an array with dimension (K,K,N)). I tried apply, but that did not work. Any suggestions? Thanks! Stephan ## Here is a simple example: u <...
2010 Nov 17
1
Multiple Line Plots with xyplot
I'm trying to make multiple line plots, each with a different color, using the xyplot command. Specifically, I have an NxK matrix Y and an Nx1 matrix x. I would like the plot to contain a line for each (x, Y[,i]), i=1:K. I know something like xyplot(Y[,1] + Y[,2] + Y[,3] ~ x, type='l') will work, but if Y is large, this notation can get very awkward. Is there a way to do something simpler, along the lines of...
2003 Jan 16
1
Multivariate regression in R
Hi Folks, I want to do multivariate regression in R, i.e. basically (but with a complication -- see below): given an Nxp matrix Y of p-variate responses, and an Nxk matrix X of covariates, to fit the model Y = X*B + e with estimation of the kxp matrix of coefficients B and estimation of the pxp matrix of covariances between the p variates in Y. I haven't managed to find a function/package in R which seems to address this problem directly (maybe I'...
2003 Jul 15
0
Multivariate regression method
...=========================================== "%.+%"<-function(X,x){sweep(X,2,x,"+")} ## Adds x to rows of X ixX<-function(X,...){(1:ncol(X))%in%c( ... )} MV.regn<-function(S,mu,x1,...){ ### NB NB The k-variate MV variables etc are ROW vectors throughout ### (as in nxk matrix of data on n cases with k variables observed). ### NB NB S,mu,x1 MUST be arrays (matrices): create with "drop=FALSE" ### or specify when entering arguments, e.g. ### MV.regn(S,mu,X[,1,drop=FALSE],1) ### Arguments: S is the covariance matrix of MV X ### mu i...
2006 Mar 18
0
No subject
...nessie.mcc.ac.uk] Sent: Thursday, January 16, 2003 10:16 AM To: r-help at stat.math.ethz.ch Subject: [R] Multivariate regression in R Hi Folks, I want to do multivariate regression in R, i.e. basically (but with a complication -- see below): given an Nxp matrix Y of p-variate responses, and an Nxk matrix X of covariates, to fit the model Y = X*B + e with estimation of the kxp matrix of coefficients B and estimation of the pxp matrix of covariances between the p variates in Y. I haven't managed to find a function/package in R which seems to address this problem directly (maybe I'...
2007 Aug 15
3
Covariance of data with missing values.
I have a data matrix X (n x k, say) each row of which constitutes an observation of a k-dimensional random variable which I am willing, if not happy, to assume to be Gaussian, with mean ``mu'' and covariance matrix ``Sigma''. Distinct rows of X may be assumed to correspond to independent realizations of this random variable. Most rows of X (all but 240 out of 6000+ rows)
2009 Jun 24
7
Remuestreo de Clusters
Buenos dias para todos, Estoy trabajando en una aplicación que involucra análisis de clusters. Básicamente el objetivo es determinar a qué cluster pertenece cada observación de una matriz de datos "mydata" y luego generar muestras aleatorias de los mismos datos para determinar la proporción de veces que cada observación es clasificada en el cluster k. Este tipo de análisis es muy común