title: specifying probability weights in R *without* using Lumley survey package
body: <p>I would really appreciate any help with specifying probability weights in R <em>without</em> using the Lumley survey package.  I am conducting mediation analysis in R using the Imai et al mediation package, which does not currently support svyglm.</p>
  
  <p>The code I am currently running is: </p>
  
  <pre><code>olsmediator_basic&lt;-lm(poledu ~ gateway_strict_alt + gender_n + spline1 + spline2 + spline3,
     data = unifiedanalysis, weights = designweight).  
  </code></pre>
  
  <p>However, I'm unsure if this is weighting the data correctly.  The reason is that this code yields standard errors that differ from those I am getting in Stata.  The Stata code I am running is: </p>
  
  <pre><code>reg poledu gateway_strict_alt gender_n spline1 spline2 spline3 [pweight=designweight]).  
  </code></pre>
  
  <p>I was wondering if the weights option in R may not be for inverse probability weights, but I was unable to determine this from the documentation, this forum or elsewhere.  If I am missing something, I really apologize - I am new to R as well as to this forum.</p>
  
  <p>Thank you in advance for your help.  </p>