====== Conduct Monte Carlo based power analysis using the path diagram interface ====== 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: {{:manual:wpdiagraminterface.png|}} ===== Rules to draw the path diagram ===== ==== Shapes ==== * {{:manual:rect.png}}: Observed variables. * {{:manual:circle.png}}: Latent variables / factors * {{:manual:triangle.png}}: Mean / intercept * {{:manual:diamond.png}}: Skewness/kurtosis * {{:manual:hexagon.png|}}: Missing data * {{:manual:arrow.png|}}: One-headed arrows for regression paths/factor loadings * {{:manual:arrowbi.png|}}: Double-headed arrows for variances / covariances ==== Rules ==== * Click {{:manual:rect.png}} or {{:manual:circle.png}} or {{:manual:hexagon.png|}} to draw the shape directly. * To draw {{:manual:triangle.png}}, first select one of the above three shapes and then click the {{:manual:triangle.png}} button on the left panel. * To draw {{:manual:hexagon.png|}}, first select {{:manual:rect.png}} or {{:manual:circle.png}}, and then click {{:manual:hexagon.png|}} button on the left panel. * To draw paths between two shapes * Method 1: Click {{:manual:arrow.png|}} or {{:manual:arrowbi.png|}}, then drag your mouse from the start variable to the end variable while pressing the left button of your mouse. * 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 {{:manual:clone.png|}} 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. ===== Rules to specify the population parameters ===== * 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. * To specify the skewness and kurtosis for an observed variables, using the path from {{:manual:diamond.png}} to {{:manual:rect.png}}. Two numbers separated by ";" are used with first one denoting the skewness and the second one denoting the kurtosis. * 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. ===== Conduct the power analysis ===== ==== Required input ==== * 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. ==== Required input ==== * To save the current path diagram, click the button {{:manual:save.png?50|}} * To open an older path diagram, click the button {{:manual:open.png?50|}} * To run the power analysis, click the button {{:manual:run.png?50|}} * To see the output of the power analysis, click the button {{:manual:out_active.png?50|}} * To download the path diagram as a SVG figure, click the button {{:manual:tosvg.png?50|}} * To draw a new path diagram, click the button {{:manual:new.png?50|}}