What R data package (or data from other source) with many variables to econometric model?

StackOverflow https://stackoverflow.com/questions/6331214

  •  27-10-2019
  •  | 
  •  

문제

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 should 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")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top