simulation experimentI want to make a simulation experiment, generate 12 random variables, each variable contains 100 observations, so that the variables are subject to heterogeneity problem, and follow the normal distribution
The experiment is repeated 10,000 times.
# I don't know how to do this with JMPpro
Thanks
Data TableScriptingWindowsRe: simulation experimentI don't know what the heterogeneity problem is, but the rest might look like this:
dt = As Table( J( 100 * 10000, 12, Random Normal( 0, 1 ) ) );
dt << New Column( "group", formula( Floor( (Row() - 1) / 100 ) + 1 ) );
dt << runformulas;
dt:group << deleteformula;
dt << Go To( group );
dt << Move Selected Columns( To first );
Do your analysis with the group variable.
12 million random normal numbers
Re: simulation experimentSummary might be a good start
</CODE></P>
<PRE><CODE class=" language-jsl">dt = As Table( J( 100 * 10000, 12, Random Normal( 0, 1 ) ) );
dt << New Column( "group", formula( Floor( (Row() - 1) / 100 ) + 1 ) );
dt << runformulas;
dt:group << deleteformula;
dt << Go To( group );
dt << Move Selected Columns( To first );
dtsummary = dt << Summary(
Group( :group ),
Mean( :Col1 ),
Min( :Col1 ),
Max( :Col1 ),
Std Dev( :Col1 ),
Mean( :Col2 ),
Min( :Col2 ),
Max( :Col2 ),
Std Dev( :Col2 ),
Freq( "None" ),
Weight( "None" )
);
dtsummary << Graph Builder(
Size( 653, 452 ),
Show Control Panel( 0 ),
Variables(
X( :group ),
Y( :"Mean(Col1)"n ),
Y( :"Min(Col1)"n, Position( 1 ) ),
Y( :"Max(Col1)"n, Position( 1 ) ),
Y( :"Std Dev(Col1)"n, Position( 1 ) ),
Y( :"Mean(Col2)"n, Position( 1 ) ),
Y( :"Min(Col2)"n, Position( 1 ) ),
Y( :"Max(Col2)"n, Position( 1 ) ),
Y( :"Std Dev(Col2)"n, Position( 1 ) )
),
Elements(
Points(
X,
Y( 1 ),
Y( 2 ),
Y( 3 ),
Y( 4 ),
Y( 5 ),
Y( 6 ),
Y( 7 ),
Y( 8 ),
Legend( 7 )
)
)
);
Color!
Re: simulation experimentDear Sir Craige_Hales
Thank you very much for helping me,
I wanted to do a simulation experiment:
Number of random variables = 12
The number of observations in each variable = 100
And that resulting variables are suffering from Heteroscedasticity problem
# With possibility of repeating the experiment 10,000 times
Re: simulation experiment
the source:
Random-Coefficient periodic autoregression (repec.org)
Re: simulation experimentcheck out a search like this https://www.google.com/search?q=site%3Ajmp.com+Heteroscedasticity to find previous questions that might have good answers in the community. In the google search GUI you can do that with site:jmp.com to limit the results:
site:jmp.com Heteroscedasticity
I'm not a statistician. The data above is random. The source you point at suggests the data should have some sort of repeat across seasons...not completely random. If 1..12 represents months of the year, it might not make sense to have a January column, a February column, ... It might make a lot more sense to have a date column and a value column.
| date |
value |
| 2020/01 |
7 |
| 2020/02 |
6 |
| 2020/03 |
8 |
I looked up Heteroscedasticity and suspect you'll need a different approach to generating your random numbers so they actually exhibit that trait. Otherwise it is just random with nothing interesting but the mu and sigma passed to random normal, as seen in the graph above.
Just guessing, and way out on a limb...I think you'd have to generate a random mu (normal? uniform?), and a sigma based on that mu, and then use RandomNormal(mu,sigma). Or I might be completely wrong.