Clear Filters
Clear Filters

solving double equation with random data with regress

3 views (last 30 days)
Hello,i am trying to find the best values of "eT" and "e" for m5 and m10 equations.
I ran the following code, i assume the by doing the commang as follows
regress([m10;m5],[v1;v2])
which estimates both m10 and m5 using v1 and v2 .(As shown in the code bellow)
my goal is to extact the best values for "eT" and "e" in m10 and m5 equations using B(1) and B(2) result coeeficients
so by theory i have two equations
B(1)*v1 which is B(1)*(2*eT+3*e)=m10
B(2)*(4*eT+5*e)=m5
but m10 and m5 are vectors of random data ,which m10 m5 cells to choose to get a good aproximation for "eT" and "e"?
Thanks.
e=0.001;
T=10;
eT=e*T;
coeff_1 = 0.05;
coeff_2 = 0.07;
n=5;
m10 = 2*eT+3*e + coeff_1*randn(n,1);
m5 = 4*eT+5*e + coeff_2*randn(n,1);
[B,BINT,R] = regress([m10;m5],[repmat([2,3],n,1);repmat([4,5],n,1)]);

Answers (1)

Star Strider
Star Strider on 5 Mar 2020
See my Answer to your closely related Question.

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!