regression on 2d vector in r

by Sevan Harootonian   Last Updated July 12, 2018 01:19 AM

Trying to do a simple regression on a 2d vectors. I don't think this is the right way.

vec1x= c(0.4191, -0.0064, -0.1071, 0.0605, -0.0290)

vec1y= c(8.0054, 5.7876, 6.9907, 7.9606, 8.8073)

vec2x= c(2.5424, 5.1469, 4.7073, 4.3420, 6.7717)

vec2y= c(1.1129, 2.6307, 1.7691, 0.3857, -1.6576)

vec3x= c(1.8899, 3.7936, 4.3746, 2.7874, 1.3930)

vec3y= c(9.6567, 7.4949, 6.7109, 6.9061, 8.7460)

REG=glm(c(vec3x,vec3y) ~ c(vec1x,vec1y)+ c(vec2x,vec2y))

but when I run the X and Y separately I get different beta (I should?).

Is there another type of regression I can use that can take care of this 2d? Im new to this stuff.



Related Questions


Is parametric equivalent to linear?

Updated December 24, 2017 10:19 AM


Linear Model vs Log-Linear vs Negative Binomial

Updated June 09, 2017 02:19 AM


Path analysis vs linear model

Updated February 28, 2018 23:19 PM