dt = Open( "::Desktop:assignment10.jmp" );
window = 4321; //recursive window beginning
rp = dt << New Column( "LnRV.SPY Recursive", numeric );
For( i = 0, i <= N Rows( dt ) - window - 1, i++,
dt << clear row states();
If( i,
dt << Select Rows( 1 :: window + i ),
dt << Select Rows( 1 :: window )
);
dt << Invert Row selection();
dt << Exclude(); //exclude rows outside window
fm = dt <<Fit Model( invisible(1),
Y( :LnRV.SPY ),
Effects(
:L1RV.SPY, :L2RV.SPY, :L3RV.SPY, :L4RV.SPY, :L5RV.SPY, :L6RV.SPY, :L7RV.SPY,
:L8RV.SPY, :L9RV.SPY, :L10RV.SPY, :L11RV.SPY, :L12RV.SPY, :L13RV.SPY, :L14RV.SPY,
:L15RV.SPY, :L16RV.SPY, :L17RV.SPY, :L18RV.SPY, :L19RV.SPY, :L20RV.SPY, :L21RV.SPY,
:L22RV.SPY
),
Personality( "Generalized Regression" ),
Generalized Distribution( "Normal" ),
Run(invisible( 1 ),
Fit( Estimation Method( Lasso( Adaptive ) ), Validation Method( AICc ) )
)
); //replace with your Fit Model script
fm << (fit[1] << Save Prediction Formula);
pred = column(dt, ncols(dt));
rp[i + window + 1] = pred[i + window + 1];
dt << delete columns( pred );
fm << close window()
);
dt << clear row states();
I am using JMP 17 Pro and can not seem to figure out this error.