We present the results of modelling of the radio spectrum evolution and dispersion measure variations of PSR B1259-63, a pulsar in a binary system with Be star LS 2883. We base our model on a hypothesis that the observed variations of the spectrum are caused by thermal free-free absorption occurring in the pulsar surroundings. We reproduce the observed pulsar spectral shapes in order to examine the influence of the stellar wind of LS 2883 and the equatorial disc on the pulsars radiation. The simulations of the pulsars radio emission and its consequent free-free absorption give us an insight into the impact of stellar wind and equatorial disc of LS 2883 has on the shapes of PSR B1259-63 radio spectra, providing an evidence for the connection between gigahertz-peaked spectra phenomenon and the close environment of the pulsar. Additionally, we supplement our model with an external absorbing medium, which results in a good agreement between simulated and observational data.