#RStats for Political Science

How to automate panel data modelling with dynamic formulas in R

Packages we will need: Often when I am running a bunch of regressions, I can get bogged down with lines and lines of code. It is annoying if I want to change just one part of the formula. I have to go to EACH model and change the variable(or dates or lags or regions or…

How to use the assign() function in R

We can use the assign function to create new variables. Most often I want to assign variables that I create to the Global Environment. assign particularly useful in loops, simulations, and scenarios involving conditional variable naming or creation. The basic syntax of the assign function is assign(x, value, pos = -1, envir = as.environment(pos), inherits…

Loading…

Something went wrong. Please refresh the page and/or try again.


Follow My Blog

Get new content delivered directly to your inbox.