⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maxprof.src

📁 没有说明
💻 SRC
📖 第 1 页 / 共 2 页
字号:

            j = j + 1;
        endo;
        i = i + 1;
    endo;

    if scalmiss(packr(protplot));
        if not trapchk(4);
            errorlog "ERROR: no feasible points left in profile";
        endif;
        retp(x_ret,f_ret,g_ret,h_ret,ret_ret);
    else;
        protplot = real(protplot);
    endif;

#ifunix
    if sysstate(26,0) == 2;
        if rows(LmaxSelect) == 1;
            oaw = WinGetActive;
            vv = { 100,100,640,480,40,80,1,6,15,0,0,2,2 };
            call WinSetActive(WinOpenPQG(vv,"Coefficient 1","ProPlot"));
            xy(ctp,protplot);
            call WinSetActive(oaw);
            retp(x_ret,f_ret,g_ret,h_ret,ret_ret);
        endif;

        oaw = WinGetActive;
        vv = { 100,100,640,480,40,80,1,6,15,0,0,2,2 };
        i = 1;
        do until i > rows(LmaxSelect);
            is = LmaxSelect[i];
            if Lmaxactv[is] == 0;
                i = i + 1;
                continue;
            endif;
            stri = ftos(is,"%*.*lf",1,0);
            call WinSetActive(WinOpenPQG(vv,stri,"ProPlot"));
            ylabel("\202\116\034\081\118");
            xlabel("\201Coefficient "$+stri);
            _pframe = 1;
            _paxes = 1;
            title("Profile T Plot");
            call xy(ctp[.,i],protplot[.,i]);
            vv[1:2] = vv[1:2] + 20;
            i = i + 1;
        endo;
        call WinSetActive(oaw);
    else;
        if not trapchk(4);
            errorlog "MAXProfile:  graph not produced - not in windows"\
                " environment";
        endif;
    endif;
#else

    if rows(LmaxSelect) < 2;
        xy(ctp,protplot);
        retp(x_ret,f_ret,g_ret,h_ret,ret_ret);
    endif;

#endif

    i = 2;
    do until i > rows(LmaxSelect);
        is = LmaxSelect[i];

        if Lmaxactv[is] == 0;
            i = i + 1;
            continue;
        endif;

        stri = ftos(is,"%*.*lf",1,0);
        tt0 = ftos(_max_NumCat,"%0*.*lf",1,0);
        j = 1;
        do while j < i;
            js = LmaxSelect[j];

            if Lmaxactv[js] == 0;
                j = j + 1;
                continue;
            endif;

            strj = ftos(js,"%- *.*lf",1,0);
            actv = ones(rows(x),1);
            actv[is] = 0;
            if not(Lmaxactv == 1);
                actv = Lmaxactv .* actv;
            endif;
            k = 1;
            tt1 = 1;
            do until k > _max_NumCat;

                start = x;
                start[is] = ctp[k,i];
                title0 = __title $+ " - likelihood trace - " $+ ftos(tt1,"%"\
                    "0*.*lf",1,0) $+ " of " $+ tt0 $+ " -";
                tt1 = tt1 + 1;

                { x1,L1,L1,L1,ret1,L1,L1,L1,L1,L1, _max_NumObs,_max_row,
                    _max_dsn,_max_Diagnostic } = _Max(dataset,var,lfct,
                    start, _max_Algorithm, _max_Diagnostic, _max_GradCheckTol,
                    _max_LineSearch, 0, _max_GradMethod, _max_GradStep,
                    _max_Delta, _max_Extrap, _max_GradProc, _max_GradTol,
                    _max_HessProc, _max_Interp, _max_key, _max_Lag,
                    _max_MaxIters, _max_MaxTime, _max_MaxTry, _max_NumObs,
                    _max_ParNames, _max_RandRadius, _max_Options,
                    _max_UserSearch, _max_UserNumGrad, _max_UserNumHess,
                    actv, _max_dat, _max_dsn, _max_row, __altnam, __output,
                    __row, title0, __weight );

                if ret1 == 0;
                    proLikeTr[k,1] = x1[js];
                endif;
                k = k + 1;
            endo;

            actv = ones(rows(x),1);
            actv[js] = 0;
            if not(Lmaxactv == 1);
                actv = Lmaxactv .* actv;
            endif;
            tt1 = 1;

            k = 1;
            do until k > _max_NumCat;
                start = x;
                start[js] = ctp[k,j];
                title0 = __title $+ " - Likelihood trace - " $+ ftos(tt1,"%"\
                    "0*.*lf",1,0) $+ " of " $+ tt0 $+ " -";
                tt1 = tt1 + 1;

                { x1,L1,L1,L1,ret1,L1,L1,L1,L1,L1, _max_NumObs,_max_row,
                    _max_dsn,_max_diagnostic } = _Max(dataset,var,lfct,
                    start, _max_Algorithm, _max_Diagnostic, _max_GradCheckTol,
                    _max_LineSearch, 0, _max_GradMethod, _max_GradStep,
                    _max_Delta, _max_Extrap, _max_GradProc, _max_GradTol,
                    _max_HessProc, _max_Interp, _max_key, _max_Lag,
                    _max_MaxIters, _max_MaxTime, _max_MaxTry, _max_NumObs,
                    _max_ParNames, _max_RandRadius, _max_Options,
                    _max_UserSearch, _max_UserNumGrad, _max_UserNumHess,
                    actv, _max_dat, _max_dsn, _max_row, __altnam, __output,
                    __row, title0, __weight );

                if ret1 == 0;
                    proLikeTr[k,2] = x1[is];
                endif;

                k = k + 1;
            endo;
#ifunix
            if sysstate(26,0) == 2;
                fonts("simplex simgrma");

                _pframe = 0;
                _paxes = 1;

                ylabel("\201Coefficient "$+stri);
                xlabel("\201Coefficient "$+strj);
                title("Likelihood Profile Trace");
                call WinSetActive(WinOpenPQG(vv,stri$+" by "$+strj,"LikeTr"));
                xy(ctp[.,j]~proLikeTr[.,1],proLikeTr[.,2]~ctp[.,i]);
                call WinSetActive(oaw);
            endif;

#else
            begwind;

            _pmsgstr = "";
            _pmsgctl = 0;
            title("");

            makewind(4.2,3,.2,3.3,0);
            makewind(3.2,3.2,.2,.1,0);
            makewind(3.2,3.2,4.4,.1,0);
            makewind(9,6.855,0,0,1);

            fonts("simplex simgrma");

            _pframe = 0;
            _paxes = 1;

            ylabel("\201Coefficient "$+stri);
            xlabel("\201Coefficient "$+strj);
            title("\201Likelihood Profile Trace");
            xy(ctp[.,j]~proLikeTr[.,1],proLikeTr[.,2]~ctp[.,i]);

            nextwind;

            ylabel("\202\116\034\081\118");
            xlabel("\201Coefficient "$+stri);
            _pframe = 1;
            _paxes = 1;
            title("\201Profile T Plot");
            call xy(ctp[.,i],protplot[.,i]);

            nextwind;

            ylabel("\202\116\034\081\118");
            xlabel("\201Coefficient "$+strj);
            _pframe = 1;
            _paxes = 1;
            title("\201Profile T Plot");
            call xy(ctp[.,j],protplot[.,j]);

            nextwind;

            ylabel("");
            xlabel("");
            title(title1);
            _pmsgstr = "\201Coefficients\000"$+strj$+" vs. "$+stri;
            _pmsgctl = { 5 5 .3 0 2 15 5, 5.7 4.55 .2 0 2 15 5 };
            _paxes = 0;
            _pframe = 0;

            draw;

            endwind;
#endif

            j = j + 1;
        endo;
        i = i + 1;
    endo;

#ifunix
    if sysstate(26,0) == 2;
        call WinSetActive(oaw);
    endif;
#endif

    retp(x_ret,f_ret,g_ret,h_ret,ret_ret);
endp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -