When a patient first comes into my office with complaints of erectile dysfunction, there are several categories that must be considered. After a thorough history and physical exam, the patient can typically be placed into one of eight categories based on what is found. Treatment will depend on the reason or, as we say, "etiology," of the problem.
It is usually difficult to pinpoint the contribution of psychological effects on the erectile dysfunction. Certain questions must be asked about social stresses such as death in the family, divorce, loss of a job or even a new relationship. Anxiety and insecurity can result from any of these circumstances and affect erection quality.
Of course, there is no discrete laboratory test that can be performed to measure this factor. Testing for this type of impotence has historically relied on the body's natural ability to have erections during the night, while sleeping. This obviously removes all conscious issues including partner anxiety, depression, etc. During REM (random eye movement) sleep, the potent male achieves erections several times in the course of a night. A "nocturnal penile tumescent test" is based on this physiological fact. For this test (which is not commonly performed anymore) a band is placed around the base of the penis prior to sleep. This band can then sense when the penis becomes erect throughout the course of the night. The band is connected to a monitor that senses increases in pressure or size. This can also be performed with a tape-like band that is placed around the base of the penis (less expensive). If the man wakes up and the band is broken, it is assumed he had an erection during the night. There is obvious room for error here as the man can cause damage to the band while rolling over in his sleep.
So, if a man undergoes this test and does not achieve a measurable erection during the course of the night, it may be more likely that he has other medical problems preventing him from having an erection. There may be less of a psychological affect on his ED. This test is not 100% sensitive or specific; however, meaning, there are some situations when the test may show error.
In patients whom it is believed have a significant psychological component to their erectile dysfunction, often, a psychology evaluation with a sex therapist is employed. Interviewing the partner is also very important when possible. Some urologist will counsel patients themselves on these issues as well.