相互作用のある回帰レポートのユーザー入力リストユーザーが回帰レポートで実行する列を選択できる入力ボックスがあります。 この部分はうまく機能します。 次に、列のリストをリストに挿入します。 列のリストを取得して、回帰レポートに挿入できるさまざまな相互作用を作成したいと思います。 具体的には、もう少し複雑な相互作用(つまり、列1 *列2 ^ 2)に関心があります。回帰レポートにジェネリックリスト以外のものを入れようとすると、レポートが実行されません。 レポートでこれらの相互作用を作成するにはどうすればよいですか?
ユーザー入力リストの読み取り値は次のようになります:{"列1"、 "列2"、 "列3"}
platform = dt << Fit Model(
Y(:Char(変数))、
効果(
ここに何を行けばいいの?????
)、
パーソナリティ( "一般化回帰")、
一般化分布( "正規")、
走る(
Fit(推定方法(2段階前方選択)、検証方法(AICc)、遺伝の強制)
)。
);
DOEスクリプティングRe:相互作用のある回帰レポートのユーザー入力リストScripting Indexには、Effectsの例があります-以下にコピーされています。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Dogs.jmp" );
obj = Fit Model(
Y( :LogHist0, :LogHist1, :LogHist3, :LogHist5 ),
Effects( :drug, :dep1, :drug * :dep1 ),
Personality( Manova ),
Run( Response Function( Sum ) )
);
Re:相互作用のある回帰レポートのユーザー入力リストこれを処理する1つの方法があります
names default to here(1);
dt=data table("big class");
variable = "Age";
// If you build your list as expressions the code below works
effectsList = {height, weight, weight * height};
Fit Model(
Y( :char(variable) ),
Effects( eval(effectsList) ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:char(variable) << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
);
/*
// If you build your list using strings
effectsList = {"height", "weight", "weight * height"};
// You can convert the elements back to expressions by
// using the Parse() function
For( i = 1, i <= N Items( effectsList ), i++,
effectsList[i] = Parse( effectsList[i] );
);Re:相互作用のある回帰レポートのユーザー入力リスト式を使用する別の方法は次のとおりです。 この例だけでなく、式に基づくソリューションがたくさんあります。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Dogs.jmp" );
predictor = { :drug, :dep1 };
n = N Items( predictor );
effectExpr = Expr( Effects() );
For( x1 = 1, x1 < n, x1++,
Insert Into( effectExpr, predictor[x1] );
For( x2 = 2, x2 <= n, x2++,
Eval(
Substitute(
Expr( Insert Into( effectExpr, Expr( xxx1 * xxx2 ) ) ),
Expr( xxx1 ), predictor[x1],
Expr( xxx2 ), predictor[x2]
)
)
);
);
Show( Name Expr( effectExpr) );
Eval(
Substitute(
Expr(
obj = dt << Fit Model(
Y( :LogHist0, :LogHist1, :LogHist3, :LogHist5 ),
eee,
Personality( Manova ),
Run( Response Function( Sum ) )
);
),
Expr( eee ), Name Expr( effectExpr )
)
);