Re: Regression Analysis
- From: "Greg Heath" <heath@xxxxxxxxxxxxxxxx>
- Date: 29 Jul 2005 02:10:15 -0700
Jimmy wrote:
> Thank you very much for reply and helping me in regression analysis.
>
> But i need your further help as i am not able to include terms you
> suggested i.e E and error function. I went to the fuction REGRESS and
> i got idea too but i am still not able to include the terms you
> suggested and the concept of MSE.
1. Regress reqires that a column of ones be appended to X.
For simplicity, make it the first column.
The coefficient corresponding to that column is the constant E.
2. From the equation
Y = Y0 + (X-X0)*B1 + e
where X does not contain a column of ones
E = Y0-B1*X0
3. After B1 is found, your linear approximation is
Yhat = E + X*B1
and the corresponding error term is
e = Y - Yhat.
> ( b=regress(Y,X) %%% i used this function and got 4 constants but
> still not all positive and how to calculate errors?? )
>
> Now i understand that my problem is of MULTIPLE REGRESSION and i read
> to solve this problem using back slash function in mathematics
> funcion.
>
> I request me to suggest in analysis.
Find an online tutorial via Google
tutorial multiple-regression
Hope this helps.
Greg
> Thanks and Regards
> Jimmy
>
> Greg Heath wrote:
> >
> >
> > Jimmy wrote:
> >> Hi All,
> >>
> >> I appreciate for your effort for helping me in regression
> > analysis.
> >> Still i haven't figured out the problem. Here i am gonna
> explain
> > my
> >> problem in detail.
> >>
> >> Explaination of Regression Analysis:
> >>
> >> I have exprimental data of the process that means i have ouput
> > values
> >> for each combination of input values. let say i have input
> > Pi,Qi,Ri &
> >> Si and corresponding output to those input values is Yi. where
> i
> >> suggest the no of trial of experiments. So here i have 10 sets
> of
> >> data for which i have output values.
> >
> > 10 sets of data. How many observations in each set?
> >
> >> NOW, i am trying to fit those data in linear relationship that
> > can be
> >> represented by below equation.
> >>
> >> Y=A*P + B*Q + C*R + D*S.........where A,B,C,D are constants
> >
> > You need to add a constant term and an error term to the fit:
> >
> > Y = E + A*P + B*Q + C*R + D*S + err
> >
> > You now have 5 parameters to estimate very accurately.
> > Depending on the measurement noise levels you may
> > need any where from M =10 to 300 measurements (~1 to 30
> > per data set). I would feel uneasy if M < ~100.
> >
> >> Problem:::: I want to find the POSITIVE value of A,B,C,D that
> can
> > be
> >> fit to all the 10 set of trial.....
> >
> > The positivity constraint requires much more sophisticated
> > software than you will want to deal with at this stage.
> > I suggest forgetting about that constraint for a while and
> > minimize the mean sqrared error
> >
> > MSE = (1/M)*SUM(i=1,M){erri^2 }
> > = (1/M)*SUM(i=1,M){Yi - E -A*Pi -B*Qi -C*Ri -C*Si)^2 }
> >
> >> this problem seems reverse application of regression analysis
> >
> > No. It is precisely regression analysis.
> >
> >> have output values of 10 sets of trial and want to find
> constant
> > of
> >> equation such that every time it satisfy the equation.
> >
> > If you exclude the error term, every point will not
> > satisfy the equation. Only the MSE will be minimized.
> >
> >> I would greatly appreciate your suggestion for using MATLAB to
> > solve
> >> this problem.
> >
> > I have posed the problem so that it can be put in
> > matrix form
> >
> > Y = Y0 + (X-X0)*B1 + e
> >
> > where X0 and Y0 indicate mean values that are easily
> > estimated.
> >
> > The MSE solution for B1 can be obtained by using
> > function REGRESS, the function PINV or the
> > slash solution B1 = (X-X0)\(Y-Y0).
> >
> > help regress
> > help pinv
> >
> > Hope this helps.
> >
> > Greg
> >
> > -----SNIP-----
> >
> >
.
- Prev by Date: please help me with "repmat" (warning)
- Next by Date: Re: please help me with
- Previous by thread: please help me with "repmat" (warning)
- Next by thread: Re: How to integrate a function from -inf to a ?
- Index(es):
Relevant Pages
|