2.1 Graphical Analysis
The first graph, p1, displays a scatter plot of the variable ln_sigma2 against the variable pobreza, with a smooth line representing a trend estimation. The x-axis is labeled as pobreza.
The second graph, p2, exhibits a scatter plot of the variable ln_sigma2 against the variable nd, with a smooth line indicating a trend estimation. The x-axis is labeled as Tamaño de muestra (Sample Size).
The third graph, p3, demonstrates a scatter plot of the variable ln_sigma2 in relation to the product of pobreza and nd, with a smooth line representing a trend estimation. The x-axis is labeled as Número de pobres (Number of Poor).
The fourth graph, p4, shows a scatter plot of the variable ln_sigma2 against the square root of the variable pobreza, with a smooth line representing a trend estimation. The x-axis is labeled as Raiz cuadrada de pobreza (Square Root of Poverty).
Overall, these graphs are designed to explore the relationship between ln_sigma2 and different independent variables such as pobreza, nd, and the square root of poverty. Choosing to use the “loess” function to smooth the lines instead of a straight line aids in visualizing general trends in the data more effectively.
theme_set(theme_bw())
# pobreza vs Ln_sigma2 #
p1 <- ggplot(baseFGV, aes(x = pobreza, y = ln_sigma2)) +
geom_point() +
geom_smooth(method = "loess") +
xlab("poverty")
# Sample Size vs Ln_sigma2 #
p2 <- ggplot(baseFGV, aes(x = nd, y = ln_sigma2)) +
geom_point() +
geom_smooth(method = "loess") +
xlab("Sample size")
# Number of Poor vs Ln_sigma2 #
p3 <- ggplot(baseFGV, aes(x = pobreza * nd, y = ln_sigma2)) +
geom_point() +
geom_smooth(method = "loess") +
xlab("Number of poor")
# Square Root of Poverty vs Ln_sigma2 #
p4 <- ggplot(baseFGV, aes(x = sqrt(pobreza), y = ln_sigma2)) +
geom_point() +
geom_smooth(method = "loess") +
xlab("Square root of poverty")
library(patchwork)
(p1 | p2) / (p3 | p4)