A man who prosecutors say fathered a child just so he could kill him to exact revenge on his wife was charged today with murder.

The man, Ronald L. Shanabarger, told police officers that he had planned the crime to punish his wife, Amy, who before they married had refused to cut short a vacation to comfort him after his father had died, prosecutors said.

''Shanabarger said he planned to make Amy feel the way he did when his father died,'' prosecutors said in an affidavit filed to support the murder charge.

Last Tuesday, just hours after the funeral of their son, Tyler, Mr. Shanabarger confessed to his wife that he smothered their son in his crib the night before Father's Day, investigators said. A coroner had ruled that the infant, who was 7 months old, died from sudden infant death syndrome.