23 June, 2018

The Application

This application fits simple linear regression models of body weight of chicks on the number of days since birth, to show the effects on growth of chicks of different diets. There are 4 different models can be fitted based on the 4 different experimental diets the chick received.

The Interface

The left pane contains two modules for user to select:

  • Diet type
  • Number of days since chick's birth

The right pane shows below information:

  • Dataset corresponding the chosen diet type
  • The regression line
  • Predicted body weight represented by a brown triangle.

The Interface

The Data Set

This application uses the ChickWeight dataset from the datasets package, which contains 578 rows and 4 columns from an experiment on the effect of diet on early growth of chicks.

str(ChickWeight)
## Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':   578 obs. of  4 variables:
##  $ weight: num  42 51 59 64 76 93 106 125 149 171 ...
##  $ Time  : num  0 2 4 6 8 10 12 14 16 18 ...
##  $ Chick : Ord.factor w/ 50 levels "18"<"16"<"15"<..: 15 15 15 15 15 15 15 15 15 15 ...
##  $ Diet  : Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 1 1 1 1 ...
##  - attr(*, "formula")=Class 'formula'  language weight ~ Time | Chick
##   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
##  - attr(*, "outer")=Class 'formula'  language ~Diet
##   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
##  - attr(*, "labels")=List of 2
##   ..$ x: chr "Time"
##   ..$ y: chr "Body weight"
##  - attr(*, "units")=List of 2
##   ..$ x: chr "(days)"
##   ..$ y: chr "(gm)"