What R data package (or data from other source) with many variables to econometric model?
I would like to ask if you know any R packages with data to do linear econometric model (least squares method). I must have 5-7 variables (some of them can occur insignificant later). I sho开发者_StackOverflow社区uld check heteroscedascity, autocorelation, catalysis etc. Mayby you can recommend me data from other source f.e. other math program data package?
A cool package on CRAN: http://cran.r-project.org/web/packages/HistData/index.html
The `HistData' package provides a collection of small data sets that are interesting and important in the history of statistics and data visualization. The goal of the package is to make these available, both for instructional use and for historical research. Some of these present interesting challenges for graphics or analysis in R.
[Insert apologies for shameless self-promotion here] You could also use the WDI
package to download data from the World Bank's World Development indicators. For instance, here's a least squares regression of GDP per capita on trade as a % of GDP and the density of a country's road network.
library(WDI)
ind <- c('NY.GDP.PCAP.CD', 'NE.TRD.GNFS.ZS', 'IS.ROD.DNST.K2')
dat <- WDI(country='all', start=2002, end=2002, indicator=ind)
names(dat) <- c('country', 'iso2c', 'year', 'gdp.per.cap', 'trade.to.gdp', 'roads')
mod <- lm(gdp.per.cap ~ trade.to.gdp + roads, dat)
summary(mod)
You can search for new data with keywords:
WDIsearch('forest')
http://cran.r-project.org/web/packages/WDI/index.html
May be you should find the Ecdat Package useful....this package contains a lot of data from econometrics textbooks and articles.
install.packages("Ecdat")
精彩评论