준정부기관의 정부지원금 규모와 전년도 정부평가 등급
library(ggplot2)
ratio <- read.csv("D:\\gd\\_학위논문 준비\\기관효율성 자료\\ratio.csv")
head(ratio)
## ratio subsidy grade grade2
## 1 0.006125881 44323 A 2
## 2 0.838409400 225621 A 2
## 3 0.667237176 229621 A 2
## 4 0.000000000 NA A 2
## 5 0.964371083 29855 A 2
## 6 0.013553179 41109 A 2
ratio$lnsub <- log(ratio$subsidy)
cor(ratio$grade2, ratio$ratio, use = "na.or.complete")
## [1] 0.0351553
cor(ratio$grade2, ratio$lnsub, use = "na.or.complete")
## [1] -0.1252737
cor.test(ratio$grade2, ratio$ratio, use = "na.or.complete")
##
## Pearson's product-moment correlation
##
## data: ratio$grade2 and ratio$ratio
## t = 0.60316, df = 294, p-value = 0.5469
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.07916651 0.14856440
## sample estimates:
## cor
## 0.0351553
cor.test(ratio$grade2, ratio$lnsub, use = "na.or.complete")
##
## Pearson's product-moment correlation
##
## data: ratio$grade2 and ratio$lnsub
## t = -2.0632, df = 267, p-value = 0.04006
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.24125702 -0.00576212
## sample estimates:
## cor
## -0.1252737
ggplot(ratio, aes(x = grade, y = ratio)) + geom_point(size = 6, alpha = 0.4)

ggplot(ratio, aes(x = grade, y = lnsub)) + geom_point(size = 6, alpha = 0.4)
## Warning: Removed 27 rows containing missing values (geom_point).
