I don't think so, just because the goods it provides are so numerous and muddled.
Take one example: the fact that if I sign a contract I will feel legally obligated to follow through on it. This provides tremendous social good (billions of dollars worth), but it's very hard to quantify exactly how much.
Then you have to figure out how much it costs to provide that good. Should you include the total cost of government? No, probably not, because that includes lots of other goods. But the direct cost of say the courts isn't enough because they can only function thanks to the explicit backing of law enforcement and the implicit backing of the military.
It might be useful to start with a comparative analysis for governments though. It's probably impossible to delineate and assess every good the government provides, but you can compare the cost of governance and standard of living between countries.
In such an analysis, I highly doubt the US comes out well. Personally, I am 99% sure that my donations to the Against Malaria Foundation provide more total social good per dollar than my taxes.
It's not so clear how much of a service the government is providing there. Do you eagerly sign contracts with people you suspect would cheat you if they thought they could get away with it?
Yes, especially you include corporations as "people." Without the rule of law, I'm quite sure that corporations would find even more ways to generally break contracts and not honor their commitments.
If you're donating to specific government programs, sure, some of those are pretty similar to charities (although you can probably find a more efficient charity in nearly any area of focus). But simply donating a dollar into the funding of the US government, and having it split the same way that all US government revenue gets spent, seems to me like an obviously poor choice.
Has anyone ever tried to make a serious attempt to analytically tackle this question? There are a lot of people that try to rank charities against each other in terms of effectiveness. Could the same be done with government? Or even some portion of government? I have absolutely no idea, but this seems like an interesting question.