**Navigation**

manual:diagram_based_power_analysis

Once can conduct power analysis using Monte Carlo based method by drawing a path diagram with population parameters. An example is given in the figure below:

- To draw paths between two shapes
- Method 2: Click the start variable, then click the arrow path, and then the end variable.

- Adjust the diagram. Click any shape to highlight it, then move it around.
- Copy the diagram. First select the shapes by clicking the shapes while holding the “Ctrl” key on your keyboard. Then, click the button to paste.
- While holing the “Ctrl” key, one can drag a selection window by pressing the right button of the mouse to select multiple shapes.

- A number such as 1, 0.5, and -2, on the path will be used as population parameters to generate data from the model and the path will be estimated as free parameters in Monte Carlo simulation.
- To fix a path in the estimation, use @. For example, @1 will be fixed at 1.
- A path can be provided a name.
- For example, a?0.5 means the parameter values is 0.5, the parameter name is a, and the path needs to be estimated.
- a@0.5 means the parameter values is 0.5, the parameter name is a, and the path will be fixed at 0.5 when estimating the model.

- Default parameters
- By default, the unspecified variances will be given the value 1 and the unspecified covariance will be given the value 0.
- The unspecified regression/loading paths will be given a value 0.
- The unspecified mean/intercept will be givens a value 0.

- Sample size: an integer number for sample size
- Significance level: 0.05 typically
- MC replications: How many Monte Carlo replications are used to estimate power. 1000 typically.
- Power parameters: Parameters other than specified in the diagram. For example, one can get the power for an indirect effect a*b. To get it, specify ab := a*b. Notice that “:=” is used to define a new parameter. Each line provides one such parameter.
- Notes: put a note for the analysis.

manual/diagram_based_power_analysis.txt · Last modified: 2024/09/19 12:24 (external edit)