The data set that will be used is “MayaDataMerged.csv”.There is a lot of information about the Maya on the Yucután peninsula that have gone to see this clinic. The information is gathered so that we can hopefully find trends and make connection. Some of the information that is gathered in this is breast feeding, distance traveled, and a myriad of other factors.
There are a lot of ways to look at this data in graphs but some of the choices will be better to understand the information. An example of this would to use histograms for yes and no information. Then for data that is more numeric like weight and height scatter plot graphs will be better because it is a 2 axis information grid vs label with a numeric frequency value.
There are packages in this set that will allow for ND to be filtered out and you can get a result like median to make that data more clear.
#this package will allow for better orgenization.
#install.packages("tidyverse")
#install.packages("TinyTeX")
#library(tinytex)
#library(tidyverse)
#loading data set
maya <- read.csv( file = "MayaDataMerged.csv", header=TRUE, stringsAsFactors=FALSE )
#This is to get a look at the type of data categories that are in the file to see if we need to change any of it. This was not allowing me to publish so I made it so that it would not work.
#glimpse(maya)
#show the mean of children that have been breast fed.
breast <- maya$Breastfeeds
unique(breast)
## [1] 0 NA 1
t.test(breast, na.rm=TRUE)
##
## One Sample t-test
##
## data: breast
## t = 31.216, df = 1493, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 0.3700971 0.4197289
## sample estimates:
## mean of x
## 0.394913
hist(breast, breaks = 2, main="Breast Feeding",)
#to show the mean weight of the children.
weight <- maya$Weight
unique(weight)
## [1] 12.90 12.50 12.70 13.70 13.50 13.90 14.80 14.10 14.20 14.40 15.00 15.30
## [13] 15.40 16.10 16.30 16.40 16.50 18.80 12.60 13.60 15.60 16.80 9.50 9.20
## [25] 11.00 9.00 9.70 12.10 11.80 12.20 10.90 10.80 18.20 11.50 18.00 11.10
## [37] 18.10 6.00 10.50 3.80 5.10 13.40 10.30 10.00 13.20 7.40 15.50 13.80
## [49] 9.40 14.70 10.60 10.70 11.90 7.00 15.70 8.30 15.80 8.00 14.00 15.90
## [61] 17.00 17.40 15.20 13.00 17.20 16.00 14.60 17.70 17.60 17.30 14.50 13.30
## [73] 6.80 9.10 9.30 12.00 4.80 11.20 5.70 7.30 7.80 8.80 8.10 9.90
## [85] 7.50 8.70 8.40 6.20 6.60 8.20 4.70 8.50 11.70 5.50 11.30 3.40
## [97] 4.30 9.60 12.40 11.60 14.90 10.20 15.10 10.10 13.10 14.30 16.20 9.80
## [109] 11.40 5.60 5.00 8.90 5.30 4.50 3.20 6.70 17.10 16.70 16.60 10.40
## [121] 7.70 8.60 7.60 6.90 12.30 12.80 5.80 7.20 6.50 5.90 4.00 6.30
## [133] 5.40 4.40 7.10 2.95 3.60 7.90 17.80 4.90 18.50 18.30 19.00 19.20
## [145] 18.60 6.10 4.60 3.10 17.50 18.40 5.20 4.20 16.90 6.40 7.75 19.40
## [157] 19.30 19.50 18.90
t.test(weight)
##
## One Sample t-test
##
## data: weight
## t = 210.84, df = 2990, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 11.45779 11.67290
## sample estimates:
## mean of x
## 11.56535
#The height and weight proportions.
hw <- glm( weight~maya$Height)
#t.test(hw)
#confint(mw)
plot(weight~maya$Height, xlab="Height")
abline( a = hw[1], b=hw[2], col="red" )
#The height and weight the look to be consistent but with a few outlines of height at some of the younger ages.
age.weight<-maya$age.at.check~maya$Weight
par( mfrow=c(1,2), mar=c(4,4,1,1) )#could not get these 2 graphs to get together in the stitch.
plot(age.weight, xlab= "Weight", ylab="Age")
plot(maya$age.at.check~maya$Height, xlab= "Height", ylab="Age")
#How far the people needed to travel.
hectares <- maya$Hectares
unique(hectares)
## [1] 2.58 3.89 3.00 2.79 2.95 4.42 3.24 4.57 3.52 NA 6.15 5.14
## [13] 0.60 0.90 3.83 3.61 2.42 2.64 4.17 2.15 2.26 5.69 1.76 3.12
## [25] 2.05 4.94 3.13 5.87 3.26 4.68 2.18 6.93 7.73 3.19 6.63 10.38
## [37] 5.50 3.57 3.87 4.59 4.20 7.68
t.test(hectares, na.rm=TRUE)
##
## One Sample t-test
##
## data: hectares
## t = 100.83, df = 2664, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 3.478015 3.615974
## sample estimates:
## mean of x
## 3.546994
hist(hectares)
C2010 <- maya$Children_2010..includes.ego.
unique(C2010)
## [1] 2 3 4 8 1 5 6 7 10 9 15 0
t.test(hectares, na.rm=TRUE)
##
## One Sample t-test
##
## data: hectares
## t = 100.83, df = 2664, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 3.478015 3.615974
## sample estimates:
## mean of x
## 3.546994
hist(C2010)
nutri.s <- maya$NutritioNaL_StatuS
unique(nutri.s)
## [1] "N" NA "L" "M" "" "S" "n" "K"
resp.in <- maya$Respitory_Infection
unique(resp.in)
## [1] 0 1 NA
t.test(resp.in, na.rm=TRUE)
##
## One Sample t-test
##
## data: resp.in
## t = 7.1116, df = 1541, p-value = 1.749e-12
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 0.02301232 0.04054150
## sample estimates:
## mean of x
## 0.03177691
hist(resp.in, breaks = 2, main="Resp Infection",)
cor.test(maya$Respitory_Infection, maya$Breastfeeds) # there is a negative slope to the respritory and breastfeeding data put together.
##
## Pearson's product-moment correlation
##
## data: maya$Respitory_Infection and maya$Breastfeeds
## t = -2.3961, df = 1488, p-value = 0.01669
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.11242547 -0.01124873
## sample estimates:
## cor
## -0.06199637
#for what it look like a lot of the single data points it is easier to look at it with a histogram. But something like weight that really does not mean anything by its self. So you need to put it with something like height to make it more significant.
maBMI <- maya$Ma_BMI
unique(maBMI)
## [1] 29.7 29.3 31.8 21.3 38.1 25.9 35.4 23.9 21.4 32.6 25.3 23.3 20.6 28.0 33.4
## [16] 29.5 26.8 20.9 26.2 22.4 29.8 30.0 31.4 28.3 27.7 30.3 29.2 27.9 24.7 25.2
## [31] 23.2 32.0 26.1 23.0 27.5 26.6 21.0 28.6 24.1 NA 23.7 28.2 33.6 35.8 30.1
t.test(maBMI, na.rm=TRUE)
##
## One Sample t-test
##
## data: maBMI
## t = 437.59, df = 2980, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 27.61172 27.86027
## sample estimates:
## mean of x
## 27.73599
hist(maBMI, breaks = 35)
The data shown is to describe the range of the factors that are given. Comparison of factors that is to help determine the health of the child. Factors like if the child was breast fed and how long of a distance the patient traveled does not have any type of viable information because the 2 are not valid for a comparison together. This data to to help see if the development of the kids are developing in the area at a normal rate. If someone is behind the bell curve there is chance that there need to be other steps to be taken for the health of the child.
With most the data it made more since to go linear with the models. For instance the taller you get you will be putting on more weight then someone that is growing at a slower rate. Does the slower rate of growth indict that there is a issue with nutrition? There is a chance that there is a problem but if it is in between the 95% there is rally no need to look into it.
From filtering out all the N/A data the majority of the children had not been breast fed and only a few of the children have had a respiratory infection. And in factors like if the child had been breastfed and have had a respiratory infection does not look to have any type of correlation.
We will be able to fir this model of data to a community and see the overall health. What is needed first is to make sure you are making correct connections. There are values that have nothing to do with the health of the person. For a good amount of the data it looks like linear is a good way to go about it.
With the development of new technologies there will be better tools that will be able to go out into remote area. There is a limit of the type of data that you can get in these situations because the available tools don’t collect the types of data that you can in a city. So when instrumentation get better then the data in these areas will.