Using anova() on multivariable quantile regression model with natural splines generates error

16 Views Asked by At

I created a multivariable quantile regression model:

model <- rq(y ~ x1 + x2+ x3... + ns(high_value_x,df=5), tau = seq(0.1, 0.9, by = 0.1), data = df,  method='fn')

The high_value_x represent a continuous, numerical variable with very high values (median ~35,000) compared to other variables (categorical 0 to 1, or continuous between -10 to 300). I have got an error:

> anova(model)
Error in solve.default(D %*% W %*% t(D), D %*% coef) : 
  system is computationally singular: reciprocal condition number = 3.89884e-19

I found that to obtain results of anova() on my model I need to:

Initially, I used natural splines to fit nonlinear association between y and high_value_x.

a) How natural splines transformation effects the anova() that I cannot obtain the anova statics? b) Is it rationale to transform high_value_x by dividing by at least 100 if it has a nonlinear association with dependent variable, and ns() with df = 5 improve fitting in univariate model? c) Is any other solution for the error?

0

There are 0 best solutions below