Category : R-code

R-Packages in Windows

I need some functions over and over again. To avoid having to source them, to avoid having to copy them from project A to project B, to avoid having to re-write them, I quickly wrap them up in own r packages. Quick guide to putting fun1 and fun2 in your own package called mypkg

R does not round 2.5 to 3

In R’s default rounding function round() odd numbers ending with .5 are rounded up (from 1.5 to 2), but even numbers are rounded down (from 2.5 to 2 not to 3). This is compliant with a norm on rounding as outlined in the R documentation. I need to round 2.5 to 3 nevertheless in order to break an otherwise infinite loop in my iterative parameter approximation. Here is a solution I found on Stock Overflow who had it from statistically […]

Illustration of retention functions

Optimization via ML and SSE for Myung (2003)

R script implementing the tutorial on maximum likelihood estimation in Myung (2003). It optimizes a parametrized retention function via maximum likelihood and the sum of squared errors.