# js-regression: intercept and betha coefficient

I am trying to run a simple logistic regression (response ~ stimulus, where responses are "f" or "s" and stimulus goes from 1 to 11). My main objective is to calculate the turning point of the function (-alpha/beta). I have to use JavaScript to do it. For that, I am using js-regression package. However, the js-regression returns theta, a pair of numbers different from the alpha and beta I need. Does someone know how to calculate alpha and beta (or the turning point) from theta?

For example, consider the following data:

response<-c(rep("f",35),rep("s",75))
stimulus<-sort(c(rep(1:11,10)))
response[c(10,15,21,25,30)]<-"s"
response[c(40,45,50,60,65,70)]<-"f"
data<-as.data.frame(cbind(response,stimulus))


JavaScript:

var jsregression = require('js-regression')
var logistic = new jsregression.LogisticRegression();

The R output, using glm(family = "binomial"), is intercept = -3.5744; beta = 0.8816. Using js-regression, the output is theta= [0.5397380297076451, 0.46554794170958247].