I'm trying to code up a power and sample size calculator to put on a website, and I don't really have access to the backend of the website. So i'm limited to the things I can do with html and on-PC rendering, rather than making calls to some sort of backend language.
So i'm pretty much stuck with javascript. I don't know my ass from a hot rock with javascript.
I realize I could just find another PSS calc and copy the source code, but if it isn't public domain code, that's not really a good move. I did find a public domain Z calculator, and from there the actual calculation to move it into sample size is just simple algebra.
but when i try to merge the public domain Z calculator into
How it works:
user enters desired alpha, beta.
user enters mu0,mu1,sigma
calculate cumulative p value, power associated. (1-alpha, 1-beta...sticking with 1 sided test for now. will add radio button to select 1-sided vs 2-sided after i get it working)
calculate critical Z values associated with the p-value, power. <-- get stuck here. values not being calculated, not sure why
simple math calculation, spit out n.
The problem is I can't figure out how to trace what's happening through the program, or see if anything is happening at all. it took awhile to get to this point until I realized that the text inputs are entered as strings and javascript doesn't do on the fly retyping.
So...does anyone know of a user friendly debugging tool that will allow me to track the value of items as they change through functions?
So i'm pretty much stuck with javascript. I don't know my ass from a hot rock with javascript.
I realize I could just find another PSS calc and copy the source code, but if it isn't public domain code, that's not really a good move. I did find a public domain Z calculator, and from there the actual calculation to move it into sample size is just simple algebra.
but when i try to merge the public domain Z calculator into
How it works:
user enters desired alpha, beta.
user enters mu0,mu1,sigma
calculate cumulative p value, power associated. (1-alpha, 1-beta...sticking with 1 sided test for now. will add radio button to select 1-sided vs 2-sided after i get it working)
calculate critical Z values associated with the p-value, power. <-- get stuck here. values not being calculated, not sure why
simple math calculation, spit out n.
The problem is I can't figure out how to trace what's happening through the program, or see if anything is happening at all. it took awhile to get to this point until I realized that the text inputs are entered as strings and javascript doesn't do on the fly retyping.
So...does anyone know of a user friendly debugging tool that will allow me to track the value of items as they change through functions?
