Unexpected result for Multivariate regression/Multiple Linear Regression solution
2 次查看(过去 30 天)
显示 更早的评论
I am doing analysis on the observations that are taken from a system.
Could you please help me to find an answer for my following question ?
I have applied Multiple Linear Regression Analysis on matlab in the attached files. And also I used the mvregress function on Matlab for the multivariate regression. But the solution includes negatif values which is not acceptable where I have 8 independent variable.
Since the solution vector will represent some factors that will give us information about the sytem utilization which can’t be negatif value.
I have taken some observations below which includes information on service level (Service A, Service B, Service C, Service D). I have 4 independent variable and 1 dependent output here. Variables are: CPU impact of Service A service, CPU impact of Service B service ...
In the attached file you can find the the solution on service level.
If I continue one step further, we have some type of subscribers so called prepaid and postpaid. And I want to find a solution on the type of subscriber level as well. So the independent variable number should be twice wrt the service level analysis. CPU impact of Service A service for Prepaid subscriber, CPU impact of Service A service for Postpaid subscribers, CPU impact of Service B service for Prepaid subscribers, CPU impact of Service B service for Postpaid subscribers, ...
Unfortunately the solution where I have 8 independet variable and 1 dependet variable has some negatif values which is not acceptable.
Should I apply an other technique rather than Multiple Linear Analysis? MANOVA?
To switch to the type of subscriber level:
Assumption:
----------------
%30 of the total Service D are coming from Prepaid Subscribers,
%52 of the total Service A sessions are coming from Prepaid Subscribers,
%53 of the total Service B session/direct debit is coming from Prepaid Subscribers,
%1 of the total Service C traffic is coming from Prepaid Subscribers.
CPU Impact:
-------------
>> A=[150.86 14.01 0.91 50.03 139.26 12.46 89.72 116.73;
152.34 13.74 0.89 49.52 140.62 12.18 88.21 115.54;
152.89 13.20 0.87 48.68 141.13 11.71 86.06 113.58;
156.48 13.38 0.86 48.52 144.45 11.87 85.22 113.20;
156.17 14.17 0.91 52.38 144.15 12.56 90.32 122.21;
197.58 13.58 0.54 45.59 182.39 12.05 52.99 106.39;
159.46 13.11 0.32 39.18 147.20 11.63 31.64 91.41 ;
161.17 13.72 0.89 51.10 148.78 12.16 87.62 119.24;
153.40 13.71 0.98 49.36 141.60 12.15 97.19 115.17;
163.60 13.71 0.97 48.24 151.02 12.15 95.68 112.56;
150.73 15.16 0.80 48.39 139.13 13.44 79.32 112.90;
149.37 14.71 0.81 48.80 137.88 13.05 80.08 113.86;
152.71 14.65 0.80 48.38 140.97 12.99 78.99 112.88;
156.71 14.53 0.78 48.27 144.65 12.88 76.83 112.64;
154.62 14.69 0.23 51.53 142.73 13.03 23.11 120.23 ;
189.39 14.43 0.51 47.10 174.83 12.79 50.09 109.90;
163.25 14.14 0.32 40.53 150.70 12.53 31.70 94.56 ;
161.25 14.66 0.78 49.88 148.85 13.00 77.49 116.40;
154.51 14.77 0.88 48.94 142.63 13.09 87.50 114.18;
157.83 14.23 0.87 47.40 145.69 12.61 86.23 110.61];
>>
>>
>>
>> size(A)
ans =
20 8
>>
>>
>>
>>
>>
>>
>>
C=[39.78;
39.54 ;
39.20 ;
39.37 ;
40.88 ;
41.77 ;
34.06 ;
40.87 ;
39.96 ;
41.04 ;
38.99 ;
38.74 ;
38.90 ;
39.00 ;
40.18 ;
41.00 ;
34.93 ;
40.12 ;
39.52 ;
39.48];
>>
>>
>> size(C)
ans =
20 1
>> predictors=A;
target=C;
>> pred_cell = cell(20,1);
>> for i = 1:20,
% For each of the n points, set up a design matrix specifying
% a different intercept but common slope terms
pred_cell{i,1} = [eye(1), repmat(predictors(i,:),1,1)];
end
b = mvregress(pred_cell, target);
>>
>>
>>
>>
>> b
b =
-0.9161
-6.6618
-2.0475
-11.1524
-13.1241
7.3208
2.2994
0.1311
5.8361
>> C
C =
39.7800
39.5400
39.2000
39.3700
40.8800
41.7700
34.0600
40.8700
39.9600
41.0400
38.9900
38.7400
38.9000
39.0000
40.1800
41.0000
34.9300
40.1200
39.5200
39.4800
>> Y
Y =
39.5506
39.5784
39.0582
39.5684
41.1379
41.6759
34.1781
41.2660
40.0695
40.1857
38.7558
38.9063
39.1285
39.1432
39.8764
41.2011
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!