(no subject)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

E. Bernardo
Please kindly suggest some datasets that can be used to study moderation and mediation.

Thank you.


Reply | Threaded
Open this post in threaded view
|

(no subject)

Ryan
Eins,
 
You can generate data from a pre-specified regression equation. For example, if you were interested in generating data from a regression equation which assumed a moderation effect (e.g., interaction between two binary variables), something like this would work:
 
set seed 98765432.
new file.
inp pro.
loop id = 1 to 1000.
    comp x1 = rv.bernoulli(0.50).
    comp x2 = rv.bernoulli(0.50).
    comp y  = 0.5 + 1.3*x1 + 2.6*x2 + 1.4*x1*x2 + rv.normal(0,1).
    end case.
  end loop.
end file.
end inp pro.
exe.
 
Ryan
 
On Sat, May 21, 2011 at 9:16 AM, Eins Bernardo <[hidden email]> wrote:
Please kindly suggest some datasets that can be used to study moderation and mediation.

Thank you.