On the eve of Halloween, the night when ghosts, beasties and things that go bump in the night are said to appear, a University of California at San Francisco psychiatrist proposes that at least some of those supernatural occurrences have some very down-to-earth psychological explanations.

Based on a study of 88 people who sought psychiatric care from 1974 to 1984, Dr. Lenore Terr proposes that many ghost reports are really the result of hallucinations and illusions drawn from horrible and often life-threatening experiences. Among those who Terr studied were people who had survived fiery airplane crashes and freak car accidents. Others had almost died from severe childhood illnesses or accidents, including one child who had been mauled and scalped by a dog.

Following their experiences, many of these people reported either seeing, hearing, smelling or "feeling the presence of" ghosts or other beings. Some of the children who had been attacked by animals described being "haunted" by animal ghosts, even when they knew the animal that had attacked them was now dead.

These findings lead Terr to conclude that:

Vivid and repeated memories of a traumatic event can lead to a feeling of being "haunted."

Post-traumatic hallucinations can account for "ghosts."

These symptoms seem to be contagious. This can mean that a family, neighborhood or even a whole community may react to a supernatural experience generated by an individual.

"Psychic trauma causes paranormal experience," Terr reports in an upcoming annual journal, The Psychoanalytic Study of the Child, published by Yale University Press. Trauma probably accounts for at least some of the reports of ghosts, apparitions and poltergeists.

The idea of ghosts and other supernatural apparitions dates at least to early Greek times, when the philosopher Pliny wrote a letter to a friend describing a haunted house in Athens. More noted authors of ghost stories include Edgar Allan Poe's terrifying tales of premature burial and a heart beating beneath the floorboards of a house.

Such tales of the supernatural probably reveal a great deal about the psychological ruminations and experiences of the author, Terr suggests, "conveying their own terrors." Historians believe that when Poe was 3 years old, he and his sister were alone with their mother when she died, Terr says. They remained in bed with their dead mother until neighbors discovered them hours later.

Edith Wharton's stories also contain the recurring theme of an "unseen" ghost -- a circumstance drawn from Wharton's own experiences, Terr says. During a visit to Europe as a young girl, Wharton contracted typhoid fever and almost died. Only after her parents petitioned for help from the Russian czar's physician -- who was traveling through the town by train -- was Wharton treated and saved. Afterwards, Wharton reported having a feeling of being followed by a presence that she could not quite explain. This feeling, Terr says, is commonly reported by children who have a near-death experience.

Despite numerous reports of ghostly apparitions, psychiatry has rarely investigated the supernatural. One exception is a 1960s Cornell University study of normal 3- and 4-year old children. Researchers concluded that the children's ideas of ghosts depended on a combination of cultural images gleaned from television, movies and books, as well as from "early remembered images of night-visiting parents."

But those examples explain only part of the supernatural experiences claimed by many people. Terr, who studied the California children kidnaped in their school bus in Chowchilla in 1976, believes that when a person is unexpectedly overwhelmed by a horrible external event, "everything outside the person may begin to look spooky . . ."

"In post-traumatic situations, however, it appears to be the victim himself, not the house, that is 'haunted,' " Terr writes. "Perhaps houses offer a site upon which the flashback-seeing, scream-hearing and fire-smelling survivor can displace of his unbearable anxiety. Once that survivor leaves the house or dies, his home becomes the town's repository for the still-lingering traumatic anxiety which has been transmitted to neighbors, friends and younger family members who knew the victim. As long as the displacement of anxiety rests with the original house, everyone else may rest comfortably in his own house."

As an example of how contagious the idea of a "haunted" house can be, Terr tells of one young patient who was traumatized by a freak, fatal car accident. This young girl's family was driving through the mountains when a huge boulder careered off a cliff and crushed the back of their car. Two children sitting in the middle of the car -- the young girl's sister and her cousin -- were killed instantly. Everyone else in the car was unhurt.

Afterwards, one of the surviving children "had an on-going vision of her dead sister," Terr says. The child's dead sister came to her almost every evening, usually shortly before bedtime. This little girl reported seeing a solid image of her sister, who dressed in different colorful outfits each time she came to visit. Sometimes, the little girl also reported seeing apparitions of her dead cousin.

Terr says these were not ghosts at all but hallucinations that the little girl used to ease the separation she felt from her dead sister. The existence of the visions remained a family secret until about nine months after the accident, when the family went to a neighborhood block party.

There the little girl encountered a friend she hadn't seen since before the accident. The two girls went to the family's house to play, and the friend expressed sympathy and grief over the sister's death. To comfort her friend, who had also known her sister, Terr's patient confided that her sister came back to visit almost every night.

The friend told her mother, who then called the family to inform them that her daughter would not be allowed to play at the house any more, since it was "haunted."

"The mother took it to be a haunting of the house," Terr says, noting that it was really a hal- lucination experienced by a traumatized child.

Although the accident occurred miles from the house, "eventually the neighborhood came to attribute it to the house."

People who experience a sudden and unexpected trauma may also have a distorted sense of time. For people involved in auto accidents, time slows and the mind makes the events appear in slow motion -- perhaps, Terr suggests, as a protective mechanism to give people more time to react and avoid harm.

For others, such as those trapped by an avalanche or pinned in a car, time seems to pass much more quickly.

"After a trauma, some people believe that they have psychic warnings," Terr says. Such people look back at the events that preceded their traumatic experience, and as a way of trying to "reassert control" over what was an uncontrollable situation, "they search for omens and warnings that they believe should have foreshadowed the horrible event."

"We respond to this," she says, "because every human being wants to stay in control. No one wants to be helpless. We become terrified at the idea."