I want to estimate a regularized lasso regression model using nested cross validation to determine the best lambda and to get an estimate of internal validity. Specifically I have a binary outcome (event takes place:yes or no) and a large number of predictor variables. I would like to predict outcome. My problem is that my cases are twins and pairs of twins respond similar and score similar on predictor variables. Data are therefore dependent. Using a logistic regression I would use a random effects model to control for the dependency but this is not possible with a regularized logistic regression. My question now is: What is the best way to perform model selection and performance assessment? How would I handle the dependency during (nested) cross-validation?