How to allow logged in users to post anonymously

In order to do what you are asking, there first needs to exist an anonymous user.

Assuming this user exists, there are just a few steps:

1) modify the comment form to include the anonymous check box.

2) detect whether the box is checked.

3) if the box is checked, use the comment_save_pre filter to change the user’s info to that of the anonymous user.

Hope that points you in the right direction!

EDIT: Be sure that you have the comments settings in your dashboard only allowing loggedin users to comment.