You have one more variable than I did but I still completed what I believe to be a similar analysis in 12 minutes with just over 6 GB of memory. Does this table look like yours now?
Random Reset(123);
//Make some data
dt = New Table( "RandomEffect Example",
Add Rows( 27000 ), //Set the number of rows here
New Column(
"Store",
Character,
"Nominal",
Format( "Best", 12 ),
Formula( Char( Sequence( 1, 5500, 1, 5 ) ) )
),
New Column(
"Time",
Numeric,
"Ordinal",
Format( "Best", 12 ),
Formula( Sequence( 1, 5, 1, 1 ) )
),
New Column(
"Geo",
Numeric,
"Nominal",
Format( "Best", 12 ),
Formula( If( Random Normal() > 0, 1, 2 ) )
),
New Column(
"Type of Management",
Numeric,
"Nominal",
Format( "Best", 12 ),
Formula( If( Random Normal() > 0, 1, 2 ) )
),
New Column(
"Base Cost",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If( Row() == 1 | :Store != Lag( :Store, 1 ),
Round( Random Uniform( 1000, 2000 ), 0 ),
Lag( :Base Cost, 1 )
)
)
),
New Column(
"Cost",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
Round(
:Base Cost + If( :Type of Management == 1,
50 + 50 * :Time,
-50 * :Time
) + If( :Geo == 1,
500 + 10 * :Time,
-10 * :Time
) + Random Normal( 0, 200 )
)
)
)
);
If so, this should be the same analysis you did:
//Analysis
dt << Fit Model(
Y( :Cost ),
Effects( :Time, :Type of Management, :Time * :Type of Management ),
Random Effects( :Store[:Geo] ),
NoBounds( 1 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Minimal Report" ),
Run(
:Cost << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Effect Leverage( 0 )}
)
);