Hi TalkStats 


I have fit two different functions (f1,f2) to some data. These functions have different forms (see below), in that they have different numbers of parameters. But the data is the same - the number of predictor/dependent variables is the same.
\( f1 = \frac{1}{1 + exp((V-V_{2h})/k_h)} \)
\( f2 = y_0 + A_0 (\frac{B_0}{1 + exp((V-V_{0})/k_0)} + \frac{1+B_0}{1 + exp((V-V_{1})/k_1)}) \)
Here, V is the dependent variable (/predictor). All other occurences are parameters that are fit by a least squares method. f1 is a sigmoid with 2 parameters, f2 is a double sigmoid with 7 parameters. :yup:
I obtain a R2 for each fit; one is \(R^2_{f1}=0.99975\) and one is \(R^2_{f2}=0.995\).
I want to know which function the data fits best, i.e. is one of these R2 statistically greater than the other? Seemingly they are almost indistinguishable, but in other cases they may differ more (e.g. R2=0.95 vs 0.9). Can I do a test that tells me which function I should use? Ultimately, this is what I want to know. Whether this is decided by the R2 value or not doesn't matter (in fact I may be wrong thinking that this is what I should use).
If I am using the Rsquare to determine which function (f1 or f2) to use, I have done some reading and think I need to do something as in the following webpage:
http://www.analytictech.com/ba762/handouts/comparersquares.htm
Basically, for regression analysis you can determine whether two different R2 generated from two different regression models (typically with different numbers of predictor variables) are statistically different by calculating the F statistic. Say we have two models m1 and m2, then you can calculate the F stat:
\(
F = \frac{(R^2_{m1} - R^2_{m2})/(df_{m1} - df_{m2})}{R^2_{m2}/(n-df_{m2})}
\)
where \(df_{m1}\) and \(df_{m2}\) are the number of predictor variables in the model and \(R^2\) are the rsquareds for each of the models (m1 and m2). You obviously cannot use this analysis if the number of predictor variables is the same in the two models.
My problem is that I have the same number of predictor variables for my functions f1 and f2. The difference between the functions f1 and f2 is the number of parameters (to be fit) is different. Do I put \(df_{m1}\) and \(df_{m2}\) as the number of parameters that are used in the functions (2 and 7, respectively)?
Any help on this would be really appreciated!
Thanks,
MG :wave:
I have fit two different functions (f1,f2) to some data. These functions have different forms (see below), in that they have different numbers of parameters. But the data is the same - the number of predictor/dependent variables is the same.
\( f1 = \frac{1}{1 + exp((V-V_{2h})/k_h)} \)
\( f2 = y_0 + A_0 (\frac{B_0}{1 + exp((V-V_{0})/k_0)} + \frac{1+B_0}{1 + exp((V-V_{1})/k_1)}) \)
Here, V is the dependent variable (/predictor). All other occurences are parameters that are fit by a least squares method. f1 is a sigmoid with 2 parameters, f2 is a double sigmoid with 7 parameters. :yup:
I obtain a R2 for each fit; one is \(R^2_{f1}=0.99975\) and one is \(R^2_{f2}=0.995\).
I want to know which function the data fits best, i.e. is one of these R2 statistically greater than the other? Seemingly they are almost indistinguishable, but in other cases they may differ more (e.g. R2=0.95 vs 0.9). Can I do a test that tells me which function I should use? Ultimately, this is what I want to know. Whether this is decided by the R2 value or not doesn't matter (in fact I may be wrong thinking that this is what I should use).
If I am using the Rsquare to determine which function (f1 or f2) to use, I have done some reading and think I need to do something as in the following webpage:
http://www.analytictech.com/ba762/handouts/comparersquares.htm
Basically, for regression analysis you can determine whether two different R2 generated from two different regression models (typically with different numbers of predictor variables) are statistically different by calculating the F statistic. Say we have two models m1 and m2, then you can calculate the F stat:
\(
F = \frac{(R^2_{m1} - R^2_{m2})/(df_{m1} - df_{m2})}{R^2_{m2}/(n-df_{m2})}
\)
where \(df_{m1}\) and \(df_{m2}\) are the number of predictor variables in the model and \(R^2\) are the rsquareds for each of the models (m1 and m2). You obviously cannot use this analysis if the number of predictor variables is the same in the two models.
My problem is that I have the same number of predictor variables for my functions f1 and f2. The difference between the functions f1 and f2 is the number of parameters (to be fit) is different. Do I put \(df_{m1}\) and \(df_{m2}\) as the number of parameters that are used in the functions (2 and 7, respectively)?
Any help on this would be really appreciated!
Thanks,
MG :wave: