Jankevics
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Multivariate regression
Hi
I discovered the other day that lm() does some of the work for
you:
library(mvtnorm)
X - matrix(rnorm(60),ncol=3)
beta - matrix(1:6,ncol=2)
sig - matrix(c(1,0.7,0.7,1),2,2)
Y - X %*% beta + rmvnorm(n=20,sigma
Hello Ravi,
have you considered the SUR method proposed by Zellner? An
implementation of it is provided in CRAN-package 'systemfit' (see
?systemfit for more information).
Best,
Bernhard
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like to
Also you can take a look on Partial Least Squares (PLS) regression.
http://www.statsoft.com/textbook/stpls.html
R-package: http://mevik.net/work/software/pls.html
Andris Jankevics
On Sestdiena, 28. Oktobris 2006 06:04, Ritwik Sinha wrote:
You can use gee (
Hi
I discovered the other day that lm() does some of the work for
you:
library(mvtnorm)
X - matrix(rnorm(60),ncol=3)
beta - matrix(1:6,ncol=2)
sig - matrix(c(1,0.7,0.7,1),2,2)
Y - X %*% beta + rmvnorm(n=20,sigma=sig)
lm(Y ~ X-1)
Call:
lm(formula = Y ~ X - 1)
Coefficients:
[,1]
Hi,
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like to perform a linear regression taking
into consideration the covariance structure of Y within each unit - this
would be represented by a specified matrix V (k x k), assumed to be the
You can use gee (
http://finzi.psych.upenn.edu/R/library/geepack/html/00Index.html) or maybe
the function gls in nlme.
Ritwik.
On 10/27/06, Ravi Varadhan [EMAIL PROTECTED] wrote:
Hi,
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like
Does anyone know if there is a way to run multivariate linear regression
in R? I tried using the lm function (e.g., lm(dv1, dv2~iv1+iv2+iv3),
but got error messages. Is my syntax wrong, or do I need a particular
package?
Thanks,
Jeff--
Lusk, Jeffrey J [EMAIL PROTECTED] writes:
Does anyone know if there is a way to run multivariate linear regression
in R? I tried using the lm function (e.g., lm(dv1, dv2~iv1+iv2+iv3),
but got error messages. Is my syntax wrong, or do I need a particular
package?
You need a matrix response:
Hi Folks,
Thanks to several people's suggestions and clarifications,
I think I have implemented a function which computes the
conditional mean and covariance matrix of a subset of the
dimensions of an MV-normal variable, given the values on the
other dimensions (these conditioning value can be
On 16-Jan-03 Ted Harding wrote:
Hence the multivariate regression model for the data could be
written in matrix form as
Y = X*B + w1*W1 + w2*W2 + w3*W3 + e
[ Y Nxp ; X Nxk ; W1 W2 W3 Nxp matices of factor level indicators;
B kxp ; w1, w2, w3 scalars ]
where e is 3-dim N(0,S), and B,
10 matches
Mail list logo