San Anselmo police went to the home at 49 Sunnyside Ave. around 11 a.m. to conduct a mental health evaluation. Police said Fredrickson had a knife and was being aggressive toward officers.
Police shot Fredrickson with a Taser, which had no effect, Sgt. Robert Schneider said. When Fredrickson advanced toward the officers, one fired a gun, striking him, Schneider said.
Fredrickson was taken to Marin General Hospital where he was pronounced dead.
The Marin County Sheriff's Office is investigating the incident.
Three people, including Fredrickson, were living at the mental health care facility, according to Steve Ramsland, executive director of Buckelew Programs, the non-profit organization that operates the home.
Buckelew provides affordable housing, employment and recovery and support services for 900 youths and adults with mental illness in Marin, Sonoma and Napa counties.
Ramsland said there has never been an incident like this in the program's three decades of existence.
The shooting prompted San Anselmo Town Manager Debra Stutsman to post a message on the town's Web site about the home.
Stutsman said the state Department of Social Services Community Care Licensing Department has advised the town that under state law, "it is allowable for these facilities to be located in any residential neighborhood and near any school."
The shooting happened across the street from Wade Thomas Elementary School, which was briefly locked down during the incident.
Stutsman also said the state Health and Safety Code requires that an alcohol, drug abuse or other treatment facility that serves six or fewer people be considered a home and that its occupants and operators be considered a family.
"This is a very upsetting occurrence in a quiet neighborhood, populated with schools, churches and homes," Stutsman said in her message.
"I have been in touch with (state Assemblyman) Jared Huffman's office to alert him to the fact that San Anselmo has had a serious incident with a supported living facility and that I have received a number of complaints from residents regarding the placement of the facility near a school," Stutsman said.