R Code used for Developing Models