Skip to main content
Notice removed Draw attention by rnso
Bounty Ended with Frank Harrell's answer chosen by rnso
deleted 517 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

I am especially interested in comparison of method used by VGAM package vs method used for gamlss package in R. Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

I am especially interested in comparison of method used by VGAM package vs method used for gamlss package in R. Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

Thanks for your help.

added 110 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

I am especially interested in comparison of method used by VGAM package vs method used for gamlss package in R. Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

I am especially interested in comparison of method used by VGAM package vs method used for gamlss package in R. Thanks for your help.

added 409 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

Thanks for your help.

I have to create charts (similar to growth charts) for children of ages 5 to 15 years (only 5,6,7 etc; there are no fractional values like 2.6 years) for a health variable which is non-negative, continuous and in the range of 50-150 (with only a few values outside this range). I have to create 90th, 95th and 99th percentile curves and also create tables for these percentiles. The sample size is about 8000.

I checked and found following possible ways:

  1. Find quantiles and then use loess method to get a smooth curve from these quantiles. The degree of smoothness can be adjusted by 'span' parameter.

  2. Use LMS (Lambda-Mu-Sigma) method (e.g. using gamlss or VGAM packages in R).

  3. Use quantile regression.

  4. Use mean and SD of each age group to estimate percentile for that age and create percentile curves.

What is the best way to do it? By 'best' I mean either the ideal method which is the standard method for creation of such growth curves and would be acceptable to all. Or an easier and simpler to implement method, which may have some limitations, but is an acceptable, quicker method. (For example using loess on percentile values is much faster than using LMS of gamlss package).

Also what will be the basic R code for that method.

I personally find following method using VGAM package of R to be very useful:

library(VGAM)
fit4 <- vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
qtplot(fit4, percentiles = c(5,50,90,99), main = "Quantiles", las = 1, xlim = c(15, 90), ylab = "BMI", lwd = 2, lcol = 4)

enter image description here

Thanks for your help.

edited tags; edited tags
Link
Frank Harrell
  • 98.5k
  • 6
  • 191
  • 448
Loading
edited title
Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
Tweeted twitter.com/#!/StackStats/status/551095268352221185
Notice added Draw attention by rnso
Bounty Started worth 50 reputation by rnso
added 112 characters in body; edited title
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
added 85 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
deleted 79 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
added 23 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
added 310 characters in body
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading
Source Link
rnso
  • 10.2k
  • 19
  • 69
  • 123
Loading