  We studied the correlation between brightness and polarization variations in
3C~279 at different wavelengths, over time intervals long enough to cover the
time lags due to opacity effects. We used these correlations together with VLBI
images to constrain the radio and high energy source position.We made 7 mm
radio continuum and $R$-band polarimetric observations of 3C~279 between 2009
and 2014. The radio observations were performed at the Itapetinga Radio
Observatory, while the polarimetric data were obtained at Pico dos Dias
Observatory, both in Brazil. We compared our observations with the $\gamma$-ray
Fermi/LAT and $R$-band SMARTS light curves. We found a good correlation between
7~mm and $R$-band light curves, with a delay of $170 \pm 30$ days in radio, but
no correlation with the $\gamma$ rays. However, a group of several $\gamma$-ray
flares in April 2011 could be associated with the start of the 7 mm strong
activity observed at the end of 2011.We also detected an increase in $R$-band
polarization degree and rotation of the polarization angle simultaneous with
these flares. Contemporaneous VLBI images at the same radio frequency show two
new strong components close to the core, ejected in directions very different
from that of the jet.The good correlation between radio and $R$-band
variability suggests that their origin is synchrotron radiation. The lack of
correlation with $\gamma$-rays produced by the Inverse Compton process on some
occasions could be due to the lack of low energy photons in the jet direction
or to absorption of the high energy photons by the broad line region clouds.
The variability of the polarization parameters during flares can be easily
explained by the combination of the jet polarization parameters and those of
newly formed jet components.
