Come ottenere la forma valutata a metà di un'equazione di previsioneSto usando il modello di adattamento per costruire un'equazione di regressione per il tempo e una serie di fattori extra. L'obiettivo finale è creare una tabella in un diario che abbia l'equazione di previsione valutata per tutti i fattori extra e mostri l'equazione basata sull'intercetta pura + pendenza * tempo. Esempio:
dt = Open("$SAMPLE_DATA\Powder Metallurgy.jmp");
fm = dt << Fit Model(
Y( :Shrinkage ),
Effects(
:Formation Method, :Compaction Method, :Sintering Time
),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run()
);
PredForm = Arg(Arg((FM << GetPredictionFormula), 3),1);Ciò si traduce in equazione:
0.942161598883733 + Match( :Formation Method,
"Die", 0.0407171588498178,
"Extrusion", 0.0256123252434345,
"Isostatic", -0.0663294840932524,
.
) + Match( :Compaction Method,
"Cold", 0.594574663098895,
"Warm", -0.594574663098895,
.
) + -0.0742413463542265 * :Sintering Time
Possiamo quindi creare una tabella con i fattori extra:
dtEquations = dt << Summary(
Group( :Formation Method, :Compaction Method ),
Freq( "None" ),
Weight( "None" )
);
dtEquations << DeleteColumns(:N Rows);
E quindi come scrivo l'equazione in una nuova colonna dove guarda le prime 2 colonne (in questo esempio) e valuta le istruzioni Match, con semplificazione, ma lascia l'equazione per il tempo? Obiettivo finale:

Ancora meglio se tutti i coefficienti statici sono ridotti a uno.
L'intera cosa deve essere dinamica per più livelli di fattori extra e l'equazione potrebbe avere una pendenza comune, un'intercettazione comune o potrebbe essere pendenze diverse e/o intercettazioni diverse.
Automazione e scriptingRi: Come ottenere la forma valutata a metà di un'equazione di previsioneMolto probabilmente questo richiederà molte modifiche, ma un'opzione potrebbe essere quella di utilizzare Estrai Espr
Names Default To Here(1);
dt = Open("$SAMPLE_DATA\Powder Metallurgy.jmp");
fm = dt << Fit Model(
Y(:Shrinkage),
Effects(:Formation Method, :Compaction Method, :Sintering Time),
Personality("Standard Least Squares"),
Emphasis("Effect Leverage"),
Run()
);
dtEquations = dt << Summary(Group(:Formation Method, :Compaction Method), Freq("None"), Weight("None"));
dtEquations << New Column("Sintering Time", Character, Continuous, << Set Each Value(
PredForm = Arg(Arg((FM << GetPredictionFormula), 3), 1);
PredForm = Substitute(Name Expr(PredForm), Extract Expr(PredForm, Match(Wild List())), Eval(Extract Expr(PredForm, Match(Wild List()))));
PredForm = Substitute(Name Expr(PredForm), Extract Expr(PredForm, Match(Wild List())), Eval(Extract Expr(PredForm, Match(Wild List()))));
Char(Name Expr(PredForm));
));
Ri: Come ottenere la forma valutata a metà di un'equazione di previsione@jthi geniale, grazie!
Ho aggiunto un expr semplificato all'ultimo blocco per ridurre tutti i coefficienti a uno, ma per il resto la soluzione era perfetta.
dtEquations << New Column("Sintering Time", Character, Continuous, << Set Each Value(
PredForm = Arg(Arg((FM << GetPredictionFormula), 3), 1);
PredForm = Substitute( Name Expr( PredForm ),
Extract Expr( PredForm, Match( Wild List() ) ), Eval( Extract Expr( PredForm, Match( Wild List() ) ) )
);
PredForm = Substitute( Name Expr( PredForm ),
Extract Expr( PredForm, Match( Wild List() ) ), Eval( Extract Expr( PredForm, Match( Wild List() ) ) )
);
Char(Simplify Expr(Name Expr(PredForm)));
));Ri: Come ottenere la forma valutata a metà di un'equazione di previsioneQuesta è un'ottima domanda @pauldeen e ottima soluzione @jthi !