Height in Finland: Difference between revisions
(Data uploaded using Opasnet Base Import) |
(growth curve code added) |
||
Line 1: | Line 1: | ||
{{variable| Population characteristics | {{variable|moderator=Jouni}} | ||
[[Category:Population characteristics]] | |||
<rcode name="kk" label="Show growth curves" embed=1 graphics=1 variables=" | |||
name:sex|type:text| | |||
name:name|type:text| | |||
name:dat|type:default | |||
"> | |||
## This code is Op_en3074/kk on page [[Height in Finland]] | |||
library(OpasnetUtils) | |||
library(ggplot2) | |||
= | d <- as.data.frame(t(matrix(dat, nrow = 3))) # Sarakkeiden pitää olla päivämäärä, pituus, paino. | ||
# Ensimmäisellä rivillä pitää olla syntymäpäivä, äidin pituus ja isän pituus. | |||
colnames(d) <- c("Date", "Height", "Weight") | |||
d$Height <- as.numeric(as.character(d$Height)) | |||
d$Weight <- as.numeric(as.character(d$Weight)) | |||
motheight <- d$Height[1] | |||
fatheight <- d$Weight[1] | |||
birthdate <- d$Date[1] | |||
'' | cat("First name", name, "\n") | ||
cat("Sex", sex, "\n") | |||
cat("Mother's height", motheight, "\n") | |||
cat("Father's height", fatheight, "\n") | |||
cat("Date of birth", as.character(birthdate), "\n") | |||
d <- d[-1,] | |||
=== | oprint(d) | ||
stat <- opbase.data("Op_en3074", subset = "Heights and weights") | |||
d$Date <- as.POSIXct(strptime(d$Date, format = "%d.%m.%Y")) - as.POSIXct(strptime(birthdate, format = "%d.%m.%Y")) | |||
d$Date <- as.numeric(d$Date) / 365.25 | |||
ggplot(subset(stat, Parameter == "Mean" & Measure == "Height"), aes(x = Age, y = Result)) + geom_line() + | |||
geom_point(data = d, aes(x = Date, y = Height)) | |||
</rcode> | |||
== Question == | |||
What are the heights (and weights) in subgroups of Finnish population? | |||
== Rationale == | |||
=== Data === | |||
The most comprehensive information on heights of Finnish children are gender specific growth curves. They were previously used to extract the mean and 95% confidence interval (CI) of height at each age (month or year) from 0 to 18 years. See results of variable [[Height of 0-18 year old Finnish children]]. Based on this information probability distributions | |||
of heights of children aged 0-2 years and 2-18 years were constructed. Heights of males and females are studied separately. It was assumed that the height for each 1-month or 1-year age specific interval follows a normal distribution with mean being the mean reported in growth tables and standard deviation (SD) being the higher value of SDs calculated from the bounds of the 95% CI. 2500 values of heights for each 1-month and 1-year age interval were simulated from respective normal distributions and then grouped to match groups 0-2 years (months from 0 to 24) and 2-18 years (years from 2 to 18). Since none of parametric distributions fits the resulting data sets the empirical distribution of heights was constructed. Moreover, based on simulated data Spearman's rank correlation between age and height in each age/gender group was calculated. | |||
Results of one simulation. For each age/gender group mean height, standard deviation (sd) and five percentiles (5th, 25th, 50th, 75th, 95th) are provided. | Results of one simulation. For each age/gender group mean height, standard deviation (sd) and five percentiles (5th, 25th, 50th, 75th, 95th) are provided. | ||
Line 92: | Line 120: | ||
|---- | |---- | ||
|} | |} | ||
== See also == | |||
*[[Height of 0-18 year old Finnish children]] | |||
==References== | ==References== | ||
<references/><!-- __OBI_TS:1442994338 --> | <references/><!-- __OBI_TS:1442994338 --> |
Revision as of 08:22, 23 September 2015
Moderator:Jouni (see all) |
|
Upload data
|
Question
What are the heights (and weights) in subgroups of Finnish population?
Rationale
Data
The most comprehensive information on heights of Finnish children are gender specific growth curves. They were previously used to extract the mean and 95% confidence interval (CI) of height at each age (month or year) from 0 to 18 years. See results of variable Height of 0-18 year old Finnish children. Based on this information probability distributions of heights of children aged 0-2 years and 2-18 years were constructed. Heights of males and females are studied separately. It was assumed that the height for each 1-month or 1-year age specific interval follows a normal distribution with mean being the mean reported in growth tables and standard deviation (SD) being the higher value of SDs calculated from the bounds of the 95% CI. 2500 values of heights for each 1-month and 1-year age interval were simulated from respective normal distributions and then grouped to match groups 0-2 years (months from 0 to 24) and 2-18 years (years from 2 to 18). Since none of parametric distributions fits the resulting data sets the empirical distribution of heights was constructed. Moreover, based on simulated data Spearman's rank correlation between age and height in each age/gender group was calculated.
Results of one simulation. For each age/gender group mean height, standard deviation (sd) and five percentiles (5th, 25th, 50th, 75th, 95th) are provided.
0-2 years males | 0-2 years females | 2-18 years males | 2-18 years females | |
mean | 73.4702 | 72.5382 | 133.7701 | 131.3875 |
sd | 10.1565 | 10.082 | 26.7919 | 25.8096 |
p5 | 53.5802 | 53.6169 | 89.6924 | 87.2984 |
p25 | 66.9607 | 65.5615 | 112.7309 | 110.5635 |
p50 | 75.4076 | 73.968 | 134.202 | 132.3863 |
p75 | 81.2614 | 80.4295 | 155.0239 | 155.0243 |
p95 | 87.1823 | 86.706 | 176.0145 | 176.7712 |
Spearman's rank correlation per age and gender:
0-2 years males | 0-2 years females | 2-18 years males | 2-18 years females | |
Spearman's rank correlation | 0.944 | 0.948 | 0.976 | 0.968 |