Recently there has been paid much attention to phenomena caused by local anharmonic vibrations of the guest ions encapsulated in polyhedral cages of materials such as pyrochlore oxides, filled skutterdites and clathrates. We theoretically investigate the optical conductivity solely due to these so-called rattling phonons in a one-dimensional anharmonic potential model. The dipole interaction of the guest ions with electric fields induces excitations expressed as transitions among vibrational states with non-equally spaced energies, resulting in a natural line broadening and a shift of the peak frequency as anharmonic effects. In the case of a single well potential, a softening of the peak frequency and an asymmetric narrowing of the line width with decreasing temperature are understood as a shift of the spectral weight to lower level transitions. On the other hand, the case of a double minima potential leads to a multi-splitting of a spectral peak in the conductivity spectrum with decreasing temperature.