ACTUALLY, there is militia, and then there is militia . . .
it is a historical record that some organized militia units were more than just ad hoc bands of men armed w/whatever and wearing the everyday clothes, or dandified social gathering with military pretenses, but actually well trained, well armed and uniformed bodies that could and did put up respectable fighting when they were called to arms.
some colonies even had full time provential soldiers in addtion to those from the REGULAR ARMY.
i would say that the type of militia in the area would depend on how much money and time the local government was willing to spend when it came to dressing, equipping, arming, training, maintaining and supporting the militia.
also the actual threat level would have a definate effect on the above actions, too. most colonists and settlers had a definate stubborn streak when it came to sharing the wives, children, livestock, wealth, or a personal FATE WORSE THAN DEATH at the hands of any type of raiders.
everyday knives clubs, agricultural and industrial tools could be used as weapons. some swells merchants, and others actually owned sword/pistols, maybe even a blunderbuss, in most urban areas.
say 75% of the _able bodied adult men and women_in a city/town would be armed with knive or improvised weapon of some sort. another 20% would have real swords and pistols, or pistols, or blunderbusses, available. and about 5% would be well armed with quality swords, handguns, blunderbusses, and muskets.
and every rural settler owned a gun for hunting and self protection.
i do not think your average pirate leader or crew was expert at anything other than nautical activities, getting falling down drunk, looking for skirts, etc, hence the poor showing a lot of them made when they met really determined resistance.
i also think boarding a ship is a lot different from forming landing parties and storming a town, especially a fortified town, from the sea or from the landward side of same.
my thoughts are that a large portion of average citizens yanked wide awake by the sounds of fighting in the streets outside their home would be scared poopless, unsure as to whether to run for it, or keep the door barred and hope for the best -say 50%. most would be involved in defending their own residence as best as they could during a pirate raid.
another 25% would make a desperate effort to escape from the raiders, with or without anything other than the clothes on their back.
the remaining 25% would fight back as best as they could, maybe even report to the assembly area for the militia, and offer organized resistance.
i would expect the REGULARS or PROVENCIALS manning the local fort to put a stiffer fight than the civvies, especially if they set tight in the fort behind stout walls and cannons, letting the pirates do their own thang for a tad before coming out for a fight. by that time, hopefully, at least half the raiders will be caught with their pants, down, hands full of booty, or falling down drunk, scattered hither and thither about the city/town, thus offering minimal resistance to the soldiers.
just some thoughts.
DAWGIE