Apparatus for transcutaneous electrical nerve stimulation in a user, the apparatus comprising: a stimulator for electrically stimulating at least one nerve with at least one stimulation pulse; a controller connected to the stimulator for controlling at least one characteristic of the at least one stimulation pulse; an analyzer for identifying the current and future presence of pain-altering patterns based on weather and/or environmental factors; and a processor connected to the analyzer and the controller for modulating the at least one characteristic of the at least one stimulation pulse according to the pain-altering patterns identified by the analyzer.