Function to standardize a column vector in a similar way that glmnet does. Used to calculate max penalty in lambda grid. Taken from: https://stackoverflow.com/questions/23686067/default-lambda-sequence-in-glmnet-for-cross-validation

mysd(z)

Arguments

z

Input