2
$\begingroup$

Origin Lab has in their fitting parameter's statistics "Dependency". Each parameter has a dependency. It's not like the covariance between 2 parameters. I thought it could be defined from all the covariances of the parameter with the others (i.e. with the covariance matrix) but I couldn't find any documentation.

I don't know if it's a general concept because I have zero knowledge in statistics. The main goal it's to implement it on Python, so if the definition is not trivial (e.g. aritmethic expressions), I would appreciate a function that can compute it.

$\endgroup$
5
  • 2
    $\begingroup$ Please supply a reference or clear quotation so that we aren't left to guess what you are asking about. $\endgroup$
    – whuber
    Commented Dec 2, 2020 at 19:20
  • $\begingroup$ @whuber, I don't understand what do you mean, I'm sorry. If "Dependency" is a general concept, I'm asking for a definition. If it's not, and it's something Origin Lab made up, I'm asking to someone who knows about Origin Lab's definitions. $\endgroup$
    – Gilgamesh
    Commented Dec 2, 2020 at 19:23
  • 3
    $\begingroup$ It is not a general concept. A tiny bit of Googling (the third hit) produced the answer at originlab.com/doc/Origin-Help/NLFit-Theory#Dependency. $\endgroup$
    – whuber
    Commented Dec 2, 2020 at 19:24
  • $\begingroup$ @whuber, thank you, I'm sorry for wasting your time. I looked into the programs help center and I found nothing. I also googled and got into the forums but still no answer. I should improve my googling skills. Thanks again. $\endgroup$
    – Gilgamesh
    Commented Dec 2, 2020 at 19:33
  • 6
    $\begingroup$ Not a waste of time -- I learned something. $\endgroup$
    – whuber
    Commented Dec 2, 2020 at 19:33

2 Answers 2

3
$\begingroup$

For completness I will write an answer. Thanks to @whuber. It's defined in the documentation as

$$\text{Dependency}_i = 1 - \frac{1}{[\mathbf{C}]_{ii} \cdot [\mathbf{C}^{-1}]_{ii}},$$

where $\mathbf{C}$ is the covariance matrix.

$\endgroup$
3
$\begingroup$

To add to the contributions @whuber and @MacroCiafa, I will include a Python implementation since that was your end goal. stats.SE is not primarily about coding, so consider this post merely a supplement to the accepted answer.

import numpy as np

def dependence(X):
    '''
    Calculate the dependence of a 
    collection of variables from a data
    matrix.
   

    PARAMETERS
        X (2D array-like): Data matrix

    RETURNS
        (1D array): Dependence score of each variable.
    '''
    C = np.cov(X)
    result = np.diag(C) * np.diag(np.linalg.inv(C))
    return 1 - 1 / result

If you're fine with using the Moore-Penrose pseudoinverse, then this can be adjusted slightly into the following.

import numpy as np

def dependence(X):
    '''
    Calculate the dependence of a 
    collection of variables from a data
    matrix.
   

    PARAMETERS
        X (2D array-like): Data matrix

    RETURNS
        (1D array): Dependence score of each variable.
    '''
    C = np.cov(X)
    result = np.diag(C) * np.diag(np.linalg.pinv(C))
    return 1 - 1 / result
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.