New Table( "rauchenSaufen", Add Rows( 27 ), New Table Variable( "Design", "3x3 Factorial" ), New Script( "Source", Data Table( "3x3 Factorial 2" ) << Sort( By( :smoking ), Order( Ascending ) ) ), New Script( "Model", Fit Model( Effects( :smoking, :drinking, :smoking * :drinking ), Y( :health ), PERSONALITY( Standard Least Squares ) ) ), New Script( "DOE Dialog", DOE( Full Factorial Design, {Add Response( None, "health", ., ., . ), Add Factor( Categorical, {"non-smoker", "occasinally", "chain smoker"}, "smoking", 0 ), Add Factor( Categorical, {"abstinent", "occasinally", "alcoholic"}, "drinking", 0 ), Set Random Seed( 1184731 ), Make Design, Replicates( 2 ), Make Table} ) ), New Column( "smoking", Character, "Nominal", Set Property( "Value Ordering", {"non-smoker", "occasinally", "chain smoker"} ), Set Property( "Design Role", DesignRole( Categorical ) ), Set Property( "Factor Changes", Easy ), Set Values( {"non-smoker", "non-smoker", "non-smoker", "non-smoker", "non-smoker", "non-smoker", "non-smoker", "non-smoker", "non-smoker", "occasinally", "occasinally", "occasinally", "occasinally", "occasinally", "occasinally", "occasinally", "occasinally", "occasinally", "chain smoker", "chain smoker", "chain smoker", "chain smoker", "chain smoker", "chain smoker", "chain smoker", "chain smoker", "chain smoker"} ) ), New Column( "drinking", Character, "Nominal", Set Property( "Value Ordering", {"abstinent", "occasinally", "alcoholic"} ), Set Property( "Design Role", DesignRole( Categorical ) ), Set Property( "Factor Changes", Easy ), Set Values( {"abstinent", "abstinent", "abstinent", "occasinally", "occasinally", "occasinally", "alcoholic", "alcoholic", "alcoholic", "abstinent", "abstinent", "abstinent", "occasinally", "occasinally", "occasinally", "alcoholic", "alcoholic", "alcoholic", "abstinent", "abstinent", "abstinent", "occasinally", "occasinally", "occasinally", "alcoholic", "alcoholic", "alcoholic"} ) ), New Column( "health", Numeric, "Continuous", Format( "Best", 12 ), Set Property( "Response Limits", {Goal( None )} ), Set Values( [10, 10, 9, 8, 6, 5, 2, 1, 1, 7, 8, 9, 4, 5, 5, 1, 0, 0, 2, 2, 3, 1, 0, 1, 0, 0, 0] ) ) ); Fit Model( Y( :health ), Effects( :smoking, :drinking, :smoking * :drinking ), Personality( "Standard Least Squares" ), Emphasis( "Effect Leverage" ), Run( Profiler( 1, Confidence Intervals( 1 ), Desirability Functions( 1 ), health << Response Limits( {Lower( -2, 1 ), Middle( 5, 1 ), Upper( 12, 1 ), Goal( "None" ), Importance( 1 )} ), Term Value( smoking( "non-smoker", Lock( 0 ), Show( 1 ) ), drinking( "abstinent", Lock( 0 ), Show( 1 ) ) ) ), :health << {Lack of Fit( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ), Plot Residual by Predicted( 1 ), Plot Effect Leverage( 1 )} ) );