linearRegression.praat 659 B

1234567891011121314151617181920
  1. echo Linear regression
  2. # Paul Boersma, 23 November 2015
  3. printline Spec & Dur table
  4. Read Table from table file... logisticRegression/rh.Table
  5. To linear regression
  6. info$ = Info
  7. intercept = extractNumber (info$, "Intercept: ")
  8. assert fixed$ (intercept, 4) = "10.0000" ; 'intercept'
  9. spec = extractNumber (info$, "Coefficient of factor Spec: ")
  10. assert left$ (fixed$ (abs (spec), 4), 6) = "0.0000" ; 'spec'
  11. dur = extractNumber (info$, "Coefficient of factor Dur: ")
  12. assert left$ (fixed$ (abs (dur), 4), 6) = "0.0000" ; 'dur'
  13. i = extractNumber (info$, "Coefficient of factor /I/: ")
  14. assert fixed$ (i, 4) = "-1.0000" ; 'i'
  15. plus Table rh
  16. Remove
  17. printline OK