I already built 2 javacript files factor.js and parm.js. factor.js is an array, having several factor as elements. for example, factor.js looks like:[code=javascript]
var factor=["intercept" , "x1","x2","x3", x4","x5"][/code]
parm.js is also an array, having coresponding parameters to those factors in factor.js file. it looks like[code=javascript]
var parm=["0.5", "0.1", "-0.2","0","1","0 .3"][/code]
I want to build an regression formula based on the factors and parameters in these two js file. for example, [code=javascript]y= 0.5+x1*0.1+x2*(-0.2)+x3*0+x4*1+ x5*0.3[/code]
i want to build text box for inputing the values of factors, like
input x1:
input x2:
...
input x5
so that when those factors change values, the y changes based on the formula.
there is a button link to y, when click the button, y changes.
how to achieve it?
Thanks
var factor=["intercept" , "x1","x2","x3", x4","x5"][/code]
parm.js is also an array, having coresponding parameters to those factors in factor.js file. it looks like[code=javascript]
var parm=["0.5", "0.1", "-0.2","0","1","0 .3"][/code]
I want to build an regression formula based on the factors and parameters in these two js file. for example, [code=javascript]y= 0.5+x1*0.1+x2*(-0.2)+x3*0+x4*1+ x5*0.3[/code]
i want to build text box for inputing the values of factors, like
input x1:
input x2:
...
input x5
so that when those factors change values, the y changes based on the formula.
there is a button link to y, when click the button, y changes.
how to achieve it?
Thanks
Comment