First off I have a 1994 Subaru Legacy LS N/A with FWD/AWD. I was driving to school today and my car felt funny while I was driving and it shut off. It was idling awkwardly too. I coasted to the side of the road and popped it into neutral and started it up and then it felt fine. The radio cut off and all the dash lights went on. This is not the first time it has done it either. It shut off for the first time about 2 months ago, initially I thought it was a fuel injector which I have sinced changed out. The second time it shut off was about a week or so ago. I have a CEL for a knock sensor, but have had that for more than a year and a half. i have been lazy with changing it. Does anyone have any idea why my car would shut off randomly. I think it is an electrical problem possibly the coil pack, but I'm a car noob right now, since I've only been driving for about 2 years.
Backround info:
I have had the car for a little more than a year and half. I have changed one fuel injector in #1, the fuel filter, spark plugwires to Bosch Platinum Wires, spark plugs to NGK Iridiums, pcv valve, air filter to a K&N air filter, the water pump and timing belt, the battery to an Autocraft gold battey and a few other things.
Any help is appreciated, also I'm at school right now so if I don't respond for awhile that's why.