在SPSS中用含欧拉数的FLI公式计算NAFLD风险变量的问题
Correct SPSS Syntax for Bedogni FLI Calculation
Your original code has three critical issues causing mismatched results:
- Incorrect exponentiation order: You applied the exponent only to
0.953instead of the entire linear combination of variables. The formula requires raisingeto the sum of all terms, not just the first coefficient. - Approximated Euler's number: Using
2.71828introduces precision errors. SPSS has a built-inEXP()function fore^xthat’s far more accurate. - Typo: You wrote
LN(gat)instead ofLN(ggt)for the GGT variable.
Correct SPSS Syntax
First, compute the linear component to avoid repeating calculations (cleaner and less error-prone):
* Calculate the linear term in the FLI formula. COMPUTE linear_term = 0.953 * LN(trig) + 0.139 * bmi + 0.718 * LN(ggt) + 0.053 * waist_circ - 15.745. * Compute FLI using the logistic function. COMPUTE FLI = (EXP(linear_term) / (1 + EXP(linear_term))) * 100. * Execute the calculations. EXECUTE.
Key Notes
- Ensure variable names (
trig,bmi,ggt,waist_circ) exactly match those in your dataset. - Missing values in any input variable will result in a missing FLI value (this is expected behavior).
- This syntax directly implements the Bedogni et al. (2006) formula and should produce results matching standard calculators.
内容的提问来源于stack exchange,提问作者WelshBOCS
相关产品推荐
相关产品推荐

