Description Usage Arguments Value Examples
Logistic Regression and Prediction
1 2 3 4 5 6 7 8 9 |
X |
a design matrix - no restrictions, but it should have an intercept column or the results will be wrong. |
y |
an outcome vector. this should either be 1/0 or it should be the number of success out of corresponding n trials (below) |
n |
the number of trials ^^. if y is 1/0, this should remain 1 and there is only one trial (either 1 or 0) initialized at 1, as most data will come as 1/0. |
i_max |
as generalized linear models use an iterative algorithm to estimate the parameter, this is the number of iterations of IRWLS that you want to perform. |
tol |
the tolerance to hop out of the algorithm. |
to_predict |
a n optional matrix to have predictions made for - should be same dimensions as X, including the intercept, or there will be an error/wrong inference. |
add_intercept |
TRUE if your design matrix needs an intercept |
coefficients, standard errors, wald statistics, p-values, odds ratios and the fitted probabilities. also returns and optional predictions for a set of test data.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.