Description Usage Arguments Details Value Examples
Performs unpenalized/ridge logistic/linear regression.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
y |
The response vector. |
X |
The design matrix. |
binomial |
A logical. Fits a logistic regression if |
intercept |
A logical, whether to include an intercept in the regression. Defaults to |
tol |
A number, tolerance. Defaults to |
maxit |
An integer, the maximum number of iterations. Defaults to |
seed |
The seed, passed to |
penalize_decider |
A logical or a function that takes |
pen_factors |
A vector of non-negative numbers, defaults to |
nfits |
A positive integer, defaults to |
runs |
A positive integer, the number of reruns. The fit with the maximum likelihood will be returned. Defaults to |
CV_or_BIC |
A logical, whether to use cross validation or BIC to choose the model from the path of penalized fits. Defaults to |
See description of each argument.
A list of following elements for the fitted model:
coefficients |
The coefficients on columns of |
logLik |
The log likelihood. |
sigmasq |
The estimated variance (sigma squared). |
df |
The effective degree of freedom. |
1 2 3 4 5 6 7 8 9 | m <- 5; n <- 100;
adj_mat <- ZiDAG::make_dag(m, mode = "chain")
d <- ZiDAG::gen_zero_dat(seed=1, gen_para="pms", adj_mat=adj_mat, n=n, gen_uniform_degree=1)
X <- full_design1(d$V[,2:m], d$Y[,2:m], right=paste(2:m),
V_degree = 2, Y_degree = 2, Y_V_degree = 2)
zi_fit_lm(d$V[,1], X, TRUE)
zi_fit_lm(d$V[,1], X, penalize_decider=TRUE, TRUE, nfits=5, runs=1)
zi_fit_lm(d$Y[,1], X, FALSE)
zi_fit_lm(d$Y[,1], X, FALSE, penalize_decider=function(X){nrow(X)<100*ncol(X)}, nfits=5, runs=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.