Is it necessary to keep a portafilter in the grouphead when not in use? Some say that keeping a portafilter in the grouphead is both beneficial for the machine and affects the quality of the espresso (by keeping the portafilter warm).

Is this accurate? If so, what are the benefits of doing so?
Keeping the portafilter warm (and receiving / tamping a dose within a warm portafilter) is supposed to result in additional oils being released in the extraction, which in theory leads to a fuller pull and more crema. It's also supposed to add to the benefits of pre-infusion.

I have experimented at length with this, and can detect positively no difference between a shot extracted from a cold filter, and one extracted from a warmed one. It might only be noticeable on higher-end (larger) machines, or simply larger filters. 

Mechanically, it's a sound enough practice as it would help keep the group head and portafilter from warping independently, even ever so slightly. Even though the seal they make is assisted by the inclined plane the filter travles to reach the head, it's still good for the filter to mate properly with the machine.

I asked my barista about this after Joel mentioned it, and he also said it's a good practice to keep. 

tl;dr; It can't hurt, and it might help, but YMMV on lesser machines.

edit

Experiments in various presses, and the amount of crema they produce have shown that pre-warming metal filters produces more crema. This eluded me because I own a pretty good machine that heats the filter quickly after it has been attached to the machine.

The accuracy would depend on your machine. The result could be more crema, and everything that a fuller extraction entails. 

suggestion

Try it on your machine and see if it makes a detectable difference.