> Hi Torsten,
>
> Thanks for your reply. However, could you provide an
> example in more detail ?
>
> For example, I have the following data.
>
> x =
> [0.0724489580240604 0.0761537353320543 0.0673597885753
> 840 0.0252107694782875 0.0342268390042021]
> y =
> [0.252611981259190 0.0785535797051596 0.03153760541324
> 24 0.0147392142107384 0.00761935961896751]
>
> I will fit these data with weighted least squares.
> Thanks again for help.
>
> Regards,
> Edward
>
>
> Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote
> in message
> <1145932120.82013.1291896533427.JavaMail.root@gallium.
> mathforum.org>...
> > > Hi All,
> > >
> > > I am planning to apply "lscov" to my data. Do you
> > > have any suggestion how to calculate weights
> factor
> > > "w" ?
> > > 
> > > x = lscov(A,b,w), where w is a vector length m of
> > > real positive weights, returns the weighted least
> > > squares solution to the linear system A*x = b,
> that
> > > is, x minimizes (b  A*x)'*diag(w)*(b  A*x). w
> > > typically contains either counts or inverse
> > > variances.
> > > 
> > >
> > > Thanks for help.
> > >
> > > Edward
> >
> > As it says in the description, w(i) = 1/(s_i)^2
> > (estimate of the inverse variance of measurement i)
> or
> > w(i) = n_i (number of times measurement i should be
>
> > included in the regression).
> >
> > Best wishes
> > Torsten.
The estimate of the inverse variance of measurement i
can not be deduced from your data, but from the
errors related with your measurement
(accuracy of the measurement device, reliability
of the person who made meassurement i etc.).
If you have no information about these
factors, choose w(i) = 1 for all i
(i.e. ordinary least squares fitting).
Best wishes
Torsten.
