So I am relatively new to stata and I need to find the power function for a two-sided test for which the lambda value <=4.
input spec
0.5
0.7
0.9
end
generate a1 = runiform()
generate a2 = -3.3<=a1<=4.7
generate lambda = a2<=4
scalar n=3
scalar si=0.2
twoway function y=normal((sqrt(n)*(lambda)/si ///
-invnormal(0.975)) + (sqrt(n)*(lambda)/si ///
-invnormal(0.975))), range(0.5 0.9) ///
title ("Power function") ytitle("power") ///
yline (0 0.05 1, lp(dash) lc(gs1))
This is the programme that I have been trying to execute but the last part from the two-way graph is creating problems. Everytime I try to run it, it shows r100 parenthesis needed. Can someone please help me out and tell me where am I going wrong in the last part where I need to plot the graph for the power function.
Related Posts with Power function analysis
Aggregating data and creating Fixed Effects and 1-hour lags of quarticsHi! I am currently working on a research project aiming at evaluating the effect of a speed-limit r…
Augmented dickey fuller test on residuals?Hello, I am writing my bachelor thesis trying to measure the effect of cryptocurrency 'forks' (fork …
Performing PCA by groupDear all, I an trying to perform a PCA analysis by company on panel data. The goal is to create an…
Command for GRS test in STATARespected sir, I have time series data on 25 portfolios excess return (dependent variable) and 6 ind…
Significance testing bysorting weeks with two groupsDear all, I have a problem with the significance testing of my results. I want to apply non parametr…
Subscribe to:
Post Comments (Atom)
0 Response to Power function analysis
Post a Comment