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

estimates post: matrix has missing values #1

Open
tobiasrenkin opened this issue Jul 7, 2020 · 2 comments
Open

estimates post: matrix has missing values #1

tobiasrenkin opened this issue Jul 7, 2020 · 2 comments

Comments

@tobiasrenkin
Copy link

I keep running into this error, even though I have excluded all observations with missing values in any variable.

A quick trace shows that the error arises after rlasso is run and tries to post "b" at line

ereturn post b, obs(N') depname(varY_d') esample(`touse')

I can "fix" it by removing variables one-by-one until I found the one that caused it. But I am not sure what the problem with that variable is. Could the problem be that it is colinear with other variables?

@tobiasrenkin
Copy link
Author

Some more information: everything works fine when I include variables X1, X2, X3, ... XN. When I add the same variables squared, rlasso for predicting Y gives the following output (vverbose):

Estimation of penalty level/loadings: Step 1.
RMSE: .697080009
Lambda: 1363.61648
Average abs. loadings: 5.6936e+14
    iter   shoots       n(w)        n(step)           f(w)
       1       96  0.0000000e+00  0.0000000e+00  0.0000000e+00              .
Number of iterations: 1
Total Shoots: 96
Convergence achieved.
Initial beta and beta after estimation:
        1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29
    +--------------------------------------------------------------------------------------------------------------------------------------------------
  1 |   .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
  2 |   .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
    +--------------------------------------------------------------------------------------------------------------------------------------------------
       30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56   57   58
     --------------------------------------------------------------------------------------------------------------------------------------------------
  1     .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
  2     .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
     --------------------------------------------------------------------------------------------------------------------------------------------------
       59   60   61   62   63   64   65   66   67   68   69   70   71   72   73   74   75   76   77   78   79   80   81   82   83   84   85   86   87
     --------------------------------------------------------------------------------------------------------------------------------------------------
  1     .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
  2     .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .
     --------------------------------------------------------------------------------------------------------------------------------------------------
       88   89   90   91   92   93   94   95   96
     ----------------------------------------------+
  1     .    .    .    .    .    .    .    .    .  |
  2     .    .    .    .    .    .    .    .    .  |
     ----------------------------------------------+
Change in RMSE: .001561638

@tobiasrenkin
Copy link
Author

Using prestd option solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant