2
$\begingroup$

I have started working on analyses of SNP's in the human genome, and I want to apply as many models as I can. But I don't know of any analogues to LASSO / ridge regression (or maybe even elastic net) with binary / trinary factors.

P.S. About my model.

Let $Y$ be dependent variable and $X_i$ - independent. Then $Y={0,1}$ and $X_i={0,1,2}$. But I always can split variable $X_i$ in this way: $X_i:=X_i'+X_i'$ which both is i.i.d. and take values ${0,1}$.

$\endgroup$
4
  • $\begingroup$ Are you asking about binary/trinary factors as outcome/dependent variables, or as predictor/independent variables? A bit more information about the specific question you are trying to answer would help. $\endgroup$
    – EdM
    Commented Nov 12, 2016 at 13:22
  • $\begingroup$ Look up the group LASSO. $\endgroup$
    – Scortchi
    Commented Nov 12, 2016 at 14:25
  • 2
    $\begingroup$ The use of "$Y$" for the independent variable (a regressor) and "$X_i$" for dependent variables (the responses) is so unusual that I have to wonder whether you have reversed the terms "dependent" and "independent". If you have not, you have a multivariate regression problem. If you have, then the usual Elastic Net works just fine. $\endgroup$
    – whuber
    Commented Nov 12, 2016 at 15:22
  • $\begingroup$ Oh, god, excuse me, you are absolutely right, it was mistake, thank you. $\endgroup$
    – Kess
    Commented Nov 12, 2016 at 17:02

2 Answers 2

2
$\begingroup$

I am not sure if you are familiar with R, put the R package glmnet containts "extremely efficient procedures for fitting the entire lasso or elastic-netregularization path for linear regression, logistic and multinomial regression models, Poisson regression and the Cox model".

The general syntax to "Fit a generalized linear model via penalized maximum likelihood" would be:

    fit=glmnet(x,y,family="binomial")

where x is your input matrix of independent variables, and y is your dependent variable (response variable). The binomial family would be for your binary dependent variable or family "multinomial" for a multinomial dependent variable.

$\endgroup$
1
  • $\begingroup$ Thank you, it is very useful answer, because I'm using exactly R in my studies. $\endgroup$
    – Kess
    Commented Nov 13, 2016 at 10:48
2
$\begingroup$

For categorical independent variables, ridge and lasso regression work fine with the usual OLS coding strategies, such as dummy coding. For categorical dependent variables, you can use ridge or lasso penalties with logistic regression or probit regression.

$\endgroup$
1
  • 2
    $\begingroup$ Agreed, but a decision should be made consciously about whether the dummy-coded variables are standardized to zero mean and unit standard deviation. That is the default in some implementations, but might not always be the best choice for dummy variables. Harrell discusses this in Chapter 9 of Regression Modeling Strategies. $\endgroup$
    – EdM
    Commented Nov 13, 2016 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.