[R] Control variables in mediation analysis

2013-03-21 Thread F.Doerwald
Hi everyone,I would like to test a mediation model, that has several control 
variables. More specifically, I would like to test the indirect effect with 
bootstrapping. However, all the packages I have found so far (e.g. MBESS) only 
allow testing a simple mediation model (One independent, one mediator, one 
dependent) so that I cannot include any controls.
Can somebody help me?


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Control variables in mediation analysis

2013-03-21 Thread Ista Zahn
Hi,

Just about anything can be bootstrapped, that's one of the things that
makes bootstrapping great! Use e.g., the boot package, and bootstrap
the product of the coefficients.

Alternatively the mediation package
(http://cran.r-project.org/web/packages/mediation/index.html) might
help, though I'm not sure if it uses bootstrap.

Best,
Ista

On Thu, Mar 21, 2013 at 3:21 PM, F.Doerwald f.doerw...@student.rug.nl wrote:
 Hi everyone,I would like to test a mediation model, that has several control 
 variables. More specifically, I would like to test the indirect effect with 
 bootstrapping. However, all the packages I have found so far (e.g. MBESS) 
 only allow testing a simple mediation model (One independent, one mediator, 
 one dependent) so that I cannot include any controls.
 Can somebody help me?


 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Control variables in mediation analysis

2013-03-21 Thread John Fox
Dear Ista and F.Doerwald,

F.Doerwald could also fit a model using sem() in the sem package, and then use 
deltaMethod() in the car package to get the estimated value and standard error 
of any function of model coefficients that he or she chooses.

Sorry, I didn't read the original posting.

I hope this helps,
 John


John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

On Thu, 21 Mar 2013 16:49:46 -0400
 Ista Zahn istaz...@gmail.com wrote:
 Hi,
 
 Just about anything can be bootstrapped, that's one of the things that
 makes bootstrapping great! Use e.g., the boot package, and bootstrap
 the product of the coefficients.
 
 Alternatively the mediation package
 (http://cran.r-project.org/web/packages/mediation/index.html) might
 help, though I'm not sure if it uses bootstrap.
 
 Best,
 Ista
 
 On Thu, Mar 21, 2013 at 3:21 PM, F.Doerwald f.doerw...@student.rug.nl wrote:
  Hi everyone,I would like to test a mediation model, that has several 
  control variables. More specifically, I would like to test the indirect 
  effect with bootstrapping. However, all the packages I have found so far 
  (e.g. MBESS) only allow testing a simple mediation model (One independent, 
  one mediator, one dependent) so that I cannot include any controls.
  Can somebody help me?
 
 
  [[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Control variables in mediation analysis

2013-03-21 Thread Bert Gunter
Well, yeah ... but it doesn't necessarily follow that the result converges
to what you want. Bootstrapping extreme order statistics is an example.

-- Bert

On Thu, Mar 21, 2013 at 1:49 PM, Ista Zahn istaz...@gmail.com wrote:

 Hi,

 Just about anything can be bootstrapped, that's one of the things that
 makes bootstrapping great! Use e.g., the boot package, and bootstrap
 the product of the coefficients.

 Alternatively the mediation package
 (http://cran.r-project.org/web/packages/mediation/index.html) might
 help, though I'm not sure if it uses bootstrap.

 Best,
 Ista

 On Thu, Mar 21, 2013 at 3:21 PM, F.Doerwald f.doerw...@student.rug.nl
 wrote:
  Hi everyone,I would like to test a mediation model, that has several
 control variables. More specifically, I would like to test the indirect
 effect with bootstrapping. However, all the packages I have found so far
 (e.g. MBESS) only allow testing a simple mediation model (One independent,
 one mediator, one dependent) so that I cannot include any controls.
  Can somebody help me?
 
 
  [[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.