Open wleoncio opened 2 months ago
Some replies from Vibeke (2024-10-01):
"I would have thought that a user would be interested in a specific endpoint and not all of them."
No, we are always interested in all the endpoints for all patients, independent of diagnosis
"Once I receive confirmation that this is correct, I'll move on to implementing the remaining functions. After that, we can talk about other possible features like confidence intervals and export of results."
I inserted values for an example patient, and the values I got calculated seems correct
If you start playing around with the values, you may notice that the HR is recalculated automatically. This makes me wonder if we really need those "Next" and "Calculate" buttons. Perhaps we can just have the output table show up once all the input variables are selected?
Yes, I agree. We do not need ‘’next’’ and ‘’calculate’’ buttons.
You shouldn’t have fields for interaction effects. If there is an interaction effect, say BMI#sex, then it is implicitly given by the table of regression coefficient estimates. Eg. if sex is coded 0 for girls and 1 for boys (Vibeke, is that how we codede sex?), then BMI#sex will have the value of BMI for boys and 0 for girls.
Correct, girls are coded 0 and boys 1.
We may want to have some graphics, for example: how does VO2Max develops over a specific range of BMI for specific values values of other covariates. Vibeke?
Yes, will come back to this.
Regression:
$$ \hat y = x \hat \beta $$
The confidence interval for $y$ is $y \pm 1.96 \mathrm{SE}$. To calculate the standard error ($\mathrm{SE}$), first we calculate $\mathrm{var}(\hat y)$:
$$ \mathrm{var}(\hat y) = \mathrm{var}(x \hat \beta) = x^T \mathrm{var}(\hat \beta) x $$
The dimension of $\mathrm{var}(\hat y)$ depends on those of $x$. If $x$ is just one observation, it is a $1 \times p$ vector and $\mathrm{var}(\hat y)$ is a scalar. Then, $SE = \sqrt{\mathrm{var}(\hat y)}$. If $x$ is just multiple ($k$ observations, it is a $k \times p$ vector and $\mathrm{var}(\hat y)$ is a $k \times k$ matrix. Then, $SE$ will be the square root of the diagonal elements of $\mathrm{var}(\hat y)$.
Adapted from comments from René: