I am pulling out the carpet in my house. I live in a cold area. I want to heat my flooring, but don't want to spend an arm and a leg doing so.
What is the most cost effective and energy efficient way to heat the floor?
It will depend on your local cost of fuels and of equipment.
The most energy-efficient way to do it would be to have a ground-source or water-source heat-pump that fed your under-floor heating. However, the capital costs of that are going to be very high.
If you have a cheap sustainable supply of biomass, then a biomass boiler feeding a wet under-floor heating system might be cost-effective.
Electrical resistance heating under the floor might be the cheapest to install, but could well be the most expensive to run.
The most cost effective and energy efficient heat is the heat that you don't lose through the envelope of your house.
Look at the whole house system and consider whether improving insulation (in the ceiling, in the walls, around the foundation) will be a better investment. It may be that you can improve the comfort level in your house without an additional ongoing heating cost - just by utilizing the heat already in the house better by not letting it escape.
You may also be able to solve the problem with few pairs of inexpensive warm slippers.
There's no real way to say for sure what the most cost effective or efficient solution to the underlying problem ("my house is too cold" or "my floors are too cold") will be without knowing a lot more details of your situation (what kind of floor? is there a basement underneath? what is your foundation like? what heating system is in place already? how cold is "cold" and how far away from comfortable is the current situation? what local renewable energy sources are affordable? etc) - but a (potentially complicated) heating system with ongoing energy inputs is likely to score worse than a solution that avoids this.
The easiest way to warm your floors, if you have access to the joists from the floor/crawl space below them is to run a PEX line through each joist space. (Easier to run from one edge, and put a double loop in each space. Anchor the lines to the joist, not the subfloor, then insulate the floor space. R12 backed by paper or plastic air barrier is sufficient. Warm air tends to rise.
Power this with a small high efficiency natural gas hot water heater. These are much cheaper than boilers. Get a tank based one. You need the tank for buffering anyway. You will need to replace the safety valve which is temperature/and pressure release with one that has a higher temperature release.
Alternative: If you live rurally and have access to lots of biomass, use an outdoor rocket stove based water heater and heat up a large water store. Run the heater whenever the big tank gets cold. Since this tank will fluctuate in temperature over a wide range, you probably will still need a buffer tank in the house.