For the first time in recorded history, I'm going to humbly disagree with 3Finger...
If you consider CI to be a form of interference, then you could infer from 10.12 (c) When an umpire awards the batter or any runner or runners one or more bases because of interference or obstruction, the official scorer shall charge the fielder who committed the interference or obstruction with one error, no matter how many bases the batter, or runner or runners, may advance.
The rule quotes about CI are sparse, but I think I've been burned on this call before. It's just another form of interference, except that the batter doesn't get charged with an AB because he never had the opportunity to resolve his AB (i.e. he never had the opportunity to put the ball in play fairly). Although from 10.22 (a) you could infer the batter should be charged with a plate appearance for the purposes of computing OBP.
The only time a batter's results should be scored as an AB on CI is if the ball is put in play and the offense ellects to take the result of the play instead of the CI. Then you score as if the CI never happened.
For earned runs, OBR basically says if the batter/runner reaches on CI, he isn't an earned run, but you likewise can't assume he would've been an out. He's basically a 'nothing'. Rule 10.16 has some details under a.2 - a.4