I have a panel dataset of 10 obs. and 3 variables. (# of the total 30 = 10 rows (= countries) * 2 columns (= migration parameters) * 1col for the corresponding year. My data frame consists of three annual data frames, so to speak.
How can I apply stargazer over the entire time period, given that this is a panel dataset (so max N = 10)? That is, R must begin after every 11th line. I would like to get a nice table for descriptive statistics
Data set for the first three years:
structure(list(Population = c(21759420, 8696916, 1946351, 14689726, 8212264, 491723, 18907008, 4345386, 11133861, 657229, 22549547, 8944706, 1979882, 15141099, 8489031, 496963, 19432541, 4404230, 11502786, 673252, 23369131, 9199259, 2014866, 15605217, 8766930, 502384, 19970495, 4448525, 11887202, 689692), Distance..km. = c(7243L, 4290L, 9500L, 3789L, 6452L, 2211L, 4667L, 5036L, 4047L, 9140L, 7243L, 4290L, 9500L, 3789L, 6452L, 2211L, 4667L, 5036L, 4047L, 9140L, 7243L, 4290L, 9500L, 3789L, 6452L, 2211L, 4667L, 5036L, 4047L, 9140L), year = c(2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010)), .Names = c("Population", "Distance..km.", "year"), row.names = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 99L, 100L, 101L, 102L, 103L, 104L, 105L, 106L, 107L, 108L), class = "data.frame")
I still get descriptive statistics from N = 30, but it should N = 10, since I am looking for descriptive statistics for the entire period of three years, and every year the data frame should be considered isolated for this. I hope I expressed the problem in an understandable way