I am using a psychophysical model to calculate the probability (P) of detecting an electrical stimulus to the skin (amplitude = x) over time (t):

\begin{equation} P(x;\alpha(t),\beta) = \dfrac{1}{1+e^{\beta(\alpha(t)-x)}}, \text{ } {\small \alpha \text{= threshold & } \beta \text{ = slope}} \end{equation}

To find the model parameters I would like to use a logistic regression function:

\begin{equation} logit(\pi) = b_0 +b_1X +b_2T \end{equation}

Does anyone know how to implement this logistic regression function in LabVIEW? As inputs I have a timevector, an amplitude vector and a response (0 or 1) vector.

  • $\begingroup$ I'm guessing you're stuck w/ LabView because you want real-time calculations based on sensor response. Otherwise, run screaming to safety. If LabView allows linking/bridging to Matlab or Python, use the builtin logit functions there. Otherwise, just write out the equations in a new unit. $\endgroup$ – Carl Witthoft Mar 30 '17 at 14:19
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because this belongs on StackOverflow or some SE site related to LabView. $\endgroup$ – Carl Witthoft Mar 30 '17 at 14:19
  • 1
    $\begingroup$ I have found a solution: I have used a Matlab node using the following code (S = stimulus amplitude, R = response (0 or 1) and t = time): b = glmfit([S' t'],R' ,'binomial','link','logit'); slope = b(2); x50 = -(b(1)+t.*b(3)/b(2))'; $\endgroup$ – Alexm Mar 31 '17 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.