I have a linear regression model for 4 different temperatures. I have put a local data filter on each one which allows me to specify the segment of data.
The code for this calls each value in my source table 2 column as shown below. I want this to be automated so there may be more or less temperatures and I don't want to edit the code each time. There probably is a way through JSL script which I try to avoid writing myself and instead use workflow. I have added a data filter in which works exactly as wanted as long as the local filters are there as well. If I remove the local filters the data filter stops working in the same way.
How can I change the Data filter to make the local filters redundant?
If not possible how would I go about coding the local filters to be automatic?
Data Table("Sorted") << Data Filter(
Location({890, 387}),
Mode(Include(1)),
Add Filter(columns(:Segment), Where(:Segment == -100), Display(:Segment, N Items(8)))
);
Data Table("Sorted") << Fit Model(
SendToByGroup(Bygroup Default),
Y(:VCE),
By(:Source Table 2),
Effects(:ICE),
Personality("Standard Least Squares"),
//Emphasis( "Effect Leverage" ),
Run(
:VCE << {Summary of Fit(0), Analysis of Variance(0), Parameter Estimates(0), Lack of Fit(0),
Scaled Estimates(0), Plot Actual by Predicted(0), Plot Residual by Predicted(0),
Plot Studentized Residuals(0), Plot Effect Leverage(0), Plot Residual by Normal Quantiles(0),
Box Cox Y Transformation(0)}
),
SendToByGroup(
{:Source Table 2 == "25C"},
Local Data Filter(Add Filter(columns(:Segment), Display(:Segment, N Items(8))))
),
SendToByGroup(
{:Source Table 2 == "150C"},
Local Data Filter(Add Filter(columns(:Segment), Display(:Segment, N Items(8))))
),
SendToByGroup(
{:Source Table 2 == "125C"},
Local Data Filter(Add Filter(columns(:Segment), Display(:Segment, N Items(8))))
),
SendToByGroup(
{:Source Table 2 == "100C"},
Local Data Filter(Add Filter(columns(:Segment), Display(:Segment, N Items(8))))
)
);