In my opinion, imitation is necessary for the beginning writer. When embarking on a new journey, regardless of what art form it takes, it is important for the artist to select a field that he is passionate about. For example, if your hero is J.K. Rowling, then a period of imitating Rowling is sure to follow.
Work and imitation go hand-in-hand when it comes to learning. It is only when imitation exceeds its natural function that a writer digs himself into a hole and stunts his creativity. Some writers will take years, some a few months, before they come upon the truly original story in themselves. After thousands of words of imitation, when I was thirty-four years old I finally made a breakthrough, relaxed, and eased my way into an originality with writing in the narrow space of theater and its uncanny resemblance to the courtroom that I have made entirely my own.