Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does rlars have to crash when not using 'fallback'? #33

Open
firthunands opened this issue Dec 20, 2016 · 1 comment
Open

does rlars have to crash when not using 'fallback'? #33

firthunands opened this issue Dec 20, 2016 · 1 comment
Assignees

Comments

@firthunands
Copy link

Hi there

While trying this mock analysis, 'rlars' crashed

key library

require(robustHD)

fit robust LARS model

require(MASS) # for the dataset
View(birthwt)
rlars(bwt ~., data=birthwt)

Andreas explained to me what 'fallback' does in the case of this data (the data set has dummy variables). The issue is fixed when typed like this 'rlars(bwt ~., data=birthwt, fallback=T)'

However, this doesn't explain why R crashes when the fallback option isn't set

Comments?

Best

Fernando

@aalfons
Copy link
Owner

aalfons commented Sep 29, 2021

It has been a few years, but I never answered here (from what I remember we had a discussion via email).

The problem is that the MAD, which is used for robust standardization, can fail in some circumstances. The fallback option is to use nonrobust standardization. It is in general safer to give an error rather than using nonrobust standardization as a default fallback.

However, there could be an extra check if the MAD failed because of a dummy variable, which are safe to standardize in a nonrobust way.

@aalfons aalfons self-assigned this Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants