Recent content by cruzeconomics

  1. C

    Parsing JSON column from a CSV file

    I am trying to parse out some JSON data that is currently in a single column of a .csv file and make that output another .csv file. I have been trying to follow along with what the other threads have said but I'm not having any luck. So, my problem is the following: I have a .csv file that has...
  2. C

    Recentering data or creating an index based on another variable

    hello all. I am trying to recenter some data that I have to run some regression discontinuity analysis. I have a data set that has variables on the make, model, model year, and percent of production with airbags and I am trying to create an index based on when airbags became standard (i.e...
  3. C

    iterative data subsetting

    I have 15 data sets that I want to take specific observations from and create a new data structure with them. Rather than doing all of this by hand, I am trying to make a function that will do it for me. This is what I have thus far: function(){ coding <- 7 for (i in 7:99){...
  4. C

    customized summary stats

    Sorry if this has already been posted, as it's relatively simple. I am looking to print out summary statistics for several variables (which is easy after reading trinker's post about xtable) but I don't need all of the ones that come in the summary( ) command (viz the quartiles). Is there a...
  5. C

    Significance levels in multinom

    I am looking to get the significance levels for a #multinom# regression output (this just does a simple multinomial logit regression). I have seen some references on other sites to use #mlogit.display# but I get an error saying [R] could not find the function. Does anyone know of a way to get...
  6. C

    Stochastic differential equation data simulation

    I have written the following which takes a bit of time to run (which is to be expected) but I am just wondering if I could speed up the time it takes if I make my code more efficient. Any help with this would be much appreciated! require(deSolve) S <- c(y=.1, b=.2, o=.7) times <-...
  7. C

    Iterative data generation

    I have a question about generating data based off of a loop... I am trying to output a 100 x 3 numerical matrix observations that are described by the following: p1_t=(p1_{t-1}*w1_{t-1})/(\bar{w_{t-1}}) p2_t=(p2_{t-1}*w2_{t-1})/(\bar{w_{t-1}}) p3_t=(p3_{t-1}*w3_{t-1})/(\bar{w_{t-1}})...