Displaying 1 result from an estimated 1 matches for "market_size".
2011 Apr 07
1
Panel data - replicating Stata's xtpcse in R
...me)
library(pcse)
D <- read.dta("http://umdrive.memphis.edu/rblanton/public/ISQ_data/blanton_isq08_data.dta")
D[544,"year"] <- 2005 ## fixing an unexpected NA in the year column
## Model formula
form <- total_FDI ~ lag_total + ciri + human_cap + worker_rts + polity_4 + market_size + income + econ_growth + log_trade + fixed_xr + fix_dollar + xr_fluct + english + lab_growth
## Model 1: no auto-correlation
res1 <- gls(model=form, data=D,correlation=NULL,na.action=na.omit)
coefficients(res1)
## Model 2: with auto-correlation
corr <- corAR1(.1,~1|c_name)
res2 <- gls(...