I can configure my camera (5D) to use long exposure noise reduction (dark frame is exposed and subtracted), but is this method really effective when shooting RAW? Or is the actual subtraction only done when shooting JPEG?
It's effective. Basically, the camera can use the second, dark frame, to subtract signal out of the first frame, so it definitely gets used in RAW. In fact, if you try it, you'll discover that you end up with only one RAW image as the DFS image is discarded after use.
On this topic, however, I'd note that you want to use this carefully. If you're doing long night exposures, DFS can double the amount of time it takes to snap a shot and that cuts into your shooting time. Many astrophotographers will do their own DFS after the fact as a result of that and us Pentaxians are gnashing our teeth because we have no option to shut it off (my only complaint about Pentax).
Yes, the long exposure noise reduction is applied to the RAW file also.
Regular noise reduction is not done on the RAW data. As that only uses the data in the image, it can be repeated afterwards. The long exposure noise reduction uses the data from another exposure to correct the data, so that can't be repeated from only the RAW data.
Can you test it out? Take a picture with noise reduction off, then with noise reduction on, and then you'll see.
As you said, it's probably a dark frame subtraction, meaning that any bias patterns that are present in the chip will get removed. These bias patterns show up on longer exposures, as in, some pixels may be more sensitive than others, so the dark frame will identify those inter-pixel biases and allow the camera to correct them. That means that it should affect RAW frames, because the intensity information from the dark frame will still be removed.
I know that it worked on my D70 back when I took pictures of the night sky. It's harder for me to find a region without light pollution nowadays.
Wasn't really intended this way (and I didn't have this information when I asked the question), but my experience shows different results. I made a 556-second exposure at ISO 400 with lens cap on and long exposure noise reduction switched on and RAW+JPEG configured. The results are 100% crops with no additional processing applied.
Canon DPP (noise reduction disabled):
Adobe Camera RAW (noise reduction disabled):
Adobe Camera RAW + Topaz Denoise (RAW-moderate setting):
My conclusion is that there is no point shooting only RAW with long exposure noise reduction on (expose and subtract dark frame) as it doubles exposure time and its effect is questionable unless done by the camera.
I've found that when using a Tv between 1 and 30 seconds or so it is quite effective. Once I process in DPP I am able to use less NR and save more detail. The subtraction is done to the RAW file, but that doesn't mean all the noise will be eliminated, only that caused by bias patterns in the chip. Other sources of noise, such as shot noise, will still require NR in post.
I don't have the patience to try it at longer than 30 second exposures.