Fit Life by X의 X 매개변수에 변수를 전달하는 방법은 무엇입니까?안녕하세요 여러분,
I need to dynamically pass variables to the X parameter in the fit life by x function. The first part of my code generates the analysis report as expected, but the second part only brings up the startup window without a report.
내 코드는 다음과 같습니다.
Names Default To Here(1);
dt = Open( "$sample_data/big class.jmp" );
x_var = "sex";
y_var = "weight";
obj1 = dt << Fit Life by X(
Distribution( Weibull ),
Nested Model Tests( Location and Scale ),
Y( Eval(y_var) ),
X( :sex ),
);
wait(2);
obj2 = dt << Fit Life by X(
Distribution( Weibull ),
Nested Model Tests( Location and Scale ),
Y( :weight ),
X( Eval(x_var) ),
);
이 문제가 발생했거나 변수를 X 매개변수에 올바르게 전달하는 방법을 아는 사람이 있습니까?
감사해요!
자동화 및 스크립팅신뢰성 분석Re: Fit Life by X에서 X 매개변수에 변수를 전달하는 방법은 무엇입니까?다음을 참조하십시오.
"관계"가 누락되었기 때문에 코드는 X를 기반으로 최선의 추측을 시도합니다. 그러나 코드가 X를 확인하는 위치에서 X는 아직 유효한 열이 아닙니다. 따라서 완전한 정보를 제공하면 코드가 함정에 빠질 필요가 없습니다.
Names Default To Here(1);
dt = Open( "$sample_data/big class.jmp" );
x_var = "sex";
y_var = "weight";
obj1 = dt << Fit Life by X(
Distribution( Weibull ),
Relationship( Location and Scale ),
Nested Model Tests( Location and Scale ),
Y( Eval(y_var) ),
X( :sex ),
);
wait(2);
obj2 = dt << Fit Life by X(
Distribution( Weibull ),
Relationship( Location and Scale ),
Nested Model Tests( Location and Scale ),
Y( :weight ),
X( Eval(x_var) ),
);
Re: Fit Life by X에서 X 매개변수에 변수를 전달하는 방법은 무엇입니까?"정상적인" 강제가 작동하지 않으므로 해결하려면 좀 더 많은 작업이 필요한 것 같습니다.
Names Default To Here(1);
dt = Open("$sample_data/big class.jmp");
x_var = "sex";
y_var = "weight";
myexpr = EvalExpr(dt << Fit Life by X(
Distribution( Weibull ),
Nested Model Tests( Location and Scale ),
Y( :weight ),
X(Expr(NameExpr(AsColumn(dt, x_var)))),
));
show(myexpr);
obj = Eval(myexpr);
Eval(Parse())(악한 구문 분석)을 사용하라고 말하고 싶은 극히 드문 경우 중 하나이지만 이것이 작동하는 것 같습니다.
Names Default To Here(1);
dt = Open("$sample_data/big class.jmp");
x_var = "sex";
y_var = "weight";
obj2 = Eval(Parse(Eval Insert("\[dt << Fit Life by X(
Distribution(Weibull),
Nested Model Tests(Location and Scale),
Y(:weight),
X(:^x_var^)
)]\")));Re: Fit Life by X에서 X 매개변수에 변수를 전달하는 방법은 무엇입니까?이 예외는 버그인 것 같습니다. 두 번째 경우에는 중첩 모델 테스트 인수가 인식되지 않습니다. 결함으로 입력되어 추적할 수 있도록 이를 JMP 기술 지원( support@jmp.com )에 보고하십시오.
Re: Fit Life by X에서 X 매개변수에 변수를 전달하는 방법은 무엇입니까?아 이게 딱 맞는 답이네요. 매우 감사합니다!
Re: Fit Life by X에서 X 매개변수에 변수를 전달하는 방법은 무엇입니까?이것은 또 다른 해결 방법이기도 합니다. 감사합니다!