Professional Documents
Culture Documents
20th by 11:59PM)
Consider the data in the file Growth.csv which contains data on average growth rates over 1960-
1995 for 65 countries, along with variables that are potentially related to growth. A complete
description of the data is given in data description which is under the name Growth- Data
Description and can be found on Blackboard.
Using this data, carry out the following empirical exercises:
1. Construct a table that shows the sample mean, std. deviation, minimum and maximum
values for the variables Growth, Trade-Share, YearsSchool, Oil, Rev_Coups,
Assasinations, and RGDP60.
6. Repeat (3) but now assume that the country’s value for TradeShare is one std. deviation
above its mean.
The coefficient of tradeshare is approximately .5647 and is statistically significant.
Notes: Please submit through email an individual word file with your answers WELL
ORGANIZED along with your R code (.R file) at the end.
R-Script:
# Clear
rm(list=ls())
#import data
gdata<-read.csv("Growth.csv")
#summarize date
str(gdata)
summary(gdata)
# Create Table
desc <- function(x){
m <- mean(x)
std <- sd(x)
mi <- min(x)
ma <- max(x)
out <- c(m,std,mi,ma)
return(out)
}
table <- apply(gdata[,-1],2,desc)
rownames(table) <- c("Mean","Standard Deviation" ,"Minimum","Maximum")
t(table)
#Regression
modell <- lm(growth~., data=gdata[,-c(1,3)])
summary(modell)