The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 From covariance to real dependency in Fits?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jorgek Posted - 09/06/2005 : 08:20:30 AM
Origin Version (Select Help-->About Origin): 7.0
Operating System: windows XP

Hi!

I got the covariance-matrix (for a PsdVoigt2 fit). My data have the errors bars used as instrumental weight. I want to calculate the true dependency (correlation coefficient) between each parameter using the matrix and did not work. How to calculate the root of the covariance reliably?... The errors of the parameters, no problem I got them using the same diagonal element of the variance-covariance matrix.

Origin presents dependency factors, but it is not clear for which parameters are this dependency results. Giving criteria of dependance between parameters is not enough: I need exactly the correlation between each pair of the parameters.

I thought the covariance matrix is there for this purpose, but I can not get reasonable numbers for the correlation coeficient (I mean between 0 and 1). There are no mistakes in data, calculation, wrong fit or whatever. Is just a problem of what the things in Origin mean!

Some help?

Thanks
3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 09/08/2005 : 12:50:08 AM
Hi Jorgek,

You maybe have a slight misunderstanding on the definition of correlation coefficient. The correlation coefficient between two parameters a and b should be r(a,b) = cov(a, b)/(sqrt(var(a)) * sqrt(var(b))). On the other hand, the covariance-matrix consists of Cij, which is the covariance between the ith variable and the jth variable. You can notice that when i equals j, the covariance is indeed equal to the variance of i(j). Hence it is very easy to calculate the correlation coefficient from the covariance-matrix: r(i,j)= Cij/(sqrt(Cii)*sqrt(Cjj)). And we could consider to directly provide both the covariance-matrix and correlation-coefficient-matrix in the future version of Origin.

In Origin 7, you can also get the correlation-coefficient-matrix by following method:
1.Suppose the covariance-matrix name is "VarCov1", new a matrix with same dimensions as VarCov1.
2.Active the new matrix, select Matrix menu - Set Values..
3.In the pop-up Set Matrix Values dlg, enter the expression "VarCov1!cell(i,j)/(sqrt(VarCov1!cell(i,i))*sqrt(VarCov1!cell(j,j)))" into the Cell(i,j)= Text Box, then click OK and the matrix will become the correlation-coefficient-matrix.

Max
OriginLab GZoffice

Edited by - minimax on 09/08/2005 05:03:32 AM
jorgek Posted - 09/07/2005 : 10:13:04 AM
Thanks, I really appreciate the answer!

well I knew already about this "total dependency" definition. I read it here in Forum. Just, Let me ask differently...

How to calculate the root of covariance for each pair of parameters for the case I mentioned? or are the Cij (where i different from j in the variance-covariance matrix) directly the covariance elements of the data like the covariance are (in my case of using the errors of fit as weigth)?

Your equation is for comparing the parameters, like a kind of "hypothesis test", it is not my intention, my intention is to get the correlation coeficient (r) from sqrt(r2) for example for the same example PsVoigt2, the correlation between the linecenter (Xc) and the called offset, baseline or cero value (y0)

r2 = cov(y0, Xc)/ {[var (x)]* var [y0]}

This value or r2 should be also between values 0 and 1.

This kind of things are very important for calculating the correlation between parameters needed for estimation of this components in the estimation of the uncertainty in measurements.
ML Posted - 09/06/2005 : 3:06:51 PM
The "Dependency" quantity shown by Nonlinear least squares fitter for the k-th parameter is obtained as:

dep = 1 - 1 / (curvmat[k][k] * covarmat[k][k])

where curvmat is the curvature matrix, whereas covarmat is the variance-covariance matrix. This is also mentioned in the help for Origin 7.5:

These list boxes display the parameter dependency. If the equation is overparameterized, there will be mutual dependency between parameters.

The dependency for the ith parameter is defined as [picture of the formula could not be pasted]. If this value is close to one, there is strong dependency.




Also, one could compute the following quantity between any two paramaters (index k must be different from index j):

t1 = curvmat[k][k] * curvmat[j][j]
t2 = curvmat[k][j] * curvmat[j][k]
mutdep = abs(t1 - t2)/abs(t1 + t2)

The pair of fitting paramaters with the smallest value of mutdep is mutually the most dependent.






Edited by - ML on 09/06/2005 3:08:19 PM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000