SteffenMoritz / ridge

CRAN R Package: Ridge Regression with automatic selection of the penalty parameter
GNU General Public License v2.0
18 stars 11 forks source link

Panel Data Ridge Regression? #20

Open tallysfeldens opened 2 years ago

tallysfeldens commented 2 years ago

Hello Steffen, How are you doing?

Thanks for keeping this package.

I'm thinking of using your package for a set of panel data, 30 years, 38 c_id.

Your package can be used for such setting? Thank you very much

SteffenMoritz commented 2 years ago

Hello Tallys,

I am doing fine, thanks for asking. About your question: Well, depends on what you are trying to do and how you want to model things. I guess could probably use linearRidge() whenever you would call lm().

But of course the ridge package isn't made especially for Panel Data. You might want to take a look at the plm package if you don't know it yet: https://cran.r-project.org/web/packages/plm/index.html

tallysfeldens commented 2 years ago

Thanks for answering me so fast!

I should have been more specific, I'm sorry about that. I've estimated a translog production function using plm, but due to its functional form my data suffer from multicollinearity and I have to re-estimate it using ridge regression.

Do your think I would have any issues using your package for this?

SteffenMoritz commented 2 years ago

What was the exact call you used in plm? (formula and parameter options)

tallysfeldens commented 2 years ago

Hi Steffen,

my plm was the following:

translog_plm <- plm(HALE ~ HE + SE + time + HE2 + SE2 + time2 + SE_HE + SET

Where HE, SE and Time are variables that due to translog production function have a linear, a squared, and an interacted parameter for each of them.

Thanks again

Em seg., 11 de abr. de 2022 às 07:06, Steffen Moritz < @.***> escreveu:

What was the exact call you used in plm? (formula and parameter options)

— Reply to this email directly, view it on GitHub https://github.com/SteffenMoritz/ridge/issues/20#issuecomment-1094856023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYUIQJSBTGERTZX2CLQ6E5LVEP2TXANCNFSM5S7A2YFQ . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Tallys Kalynka Feldens Economista SESA/PR Doutoranda em Desenvolvimento Econômico/UFPR 41 99597-0393

SteffenMoritz commented 2 years ago

Can't you just use your plm call/formula with ridge? What does the model look like (coefficents, metrics, ... ) in comparison to the plm output?