Skip to content
Snippets Groups Projects
Commit b5d5b685 authored by Bui, Ngan's avatar Bui, Ngan
Browse files

abgelegt

parent 3c670141
No related branches found
No related tags found
No related merge requests found
library(AER)
data("Journals", package = "AER")
help("Journals")
dim(Journals)
names(Journals)
summary(Journals)
mean(Journals$price)
median(Journals$pages)
Journals$
logpricecitations <- log(Journals$price/Journals$citations)
plot(Journals$logpricecitations)
plot(log(Journals$price/Journals$citations))
help("plot")
plot(log(Journals$subs) ~ log(Journals$price/Journals$citations))
install.packages("remotes") #installiert das package "remotes", das zur Installation von sozoeko1 benötigt wird
library(remotes) #lädt package "remotes" in die aktuelle Sitzung
remotes::install_gitlab("baz9527/sozoeko1", host="gitlab.rrz.uni-hamburg.de") #installiert das package "sozoeko1"
library(sozoeko1) #lädt das package in die aktuelle Sitzung
data(eduinc,package="sozoeko1")
summary(gfc)
hist(log(gfc$GDPU))
hist(log(gfc$GDPE),
main="Histogram for log(GDPE)",
xlab="GDP Euro Area",
border="blue",
col="green",
breaks=10,
prob = TRUE)
lines(density(log(gfc$GDPE)))
# Variante mit neuer Variable
gfc$gdpegdpu <- gfc$GDPE/gfc$GDPU
plot(gfc$gdpegdpu)
hist(gfc$gdpegdpu)
boxplot(gfc$GDPE,gfc$GDPU)
matrix_gfc <- data.matrix(gfc)
head(matrix_gfc)
tsgdpe <- ts(matrix_gfc[,2], start = c(1995,1), end = c(2009,4), frequency = 4)
tsgdpu <- ts(matrix_gfc[,3], start = c(1995,1), end = c(2009,4), frequency = 4)
colors <- c("blue" , "red") # definiere Farben der Linien
ts.plot(tsgdpe,tsgdpu, col = colors)
tsgdpegdpu <- ts(matrix_gfc[,4], start = c(1995,1), end = c(2009,4), frequency = 4)
ts.plot(tsgdpegdpu, ylab = "relative GDP")
dl_tsgdpe <- diff(log(tsgdpe),lag=1)
dl_tsgdpu <- diff(log(tsgdpu),lag=1)
ts.plot(dl_tsgdpe,dl_tsgdpu, col=colors)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment