Making Prediction on logistic regression using SASStochastic gradient descent in logistic regressionPython : How to use Multinomial Logistic Regression using SKlearnImbalanced Data how to use random forest to select important variables?How can I use machine learning methods on modelling time series data?Explain output of logistic classifierDisplaying date in SASHow much data is needed for a GBM to be more reliable than logistic regression for binary classification?Need Advice, Classification Problem in Python: Should I use Decision tree, Random Forests, or Logistic Regression?Multi-Class Classification With Logistic Regression On Binary DataDrop NA Values with SAS

Phrase for the opposite of "foolproof"

Build a trail cart

Past Perfect Tense

Pressure to defend the relevance of one's area of mathematics

How does a Swashbuckler rogue "fight with two weapons while safely darting away"?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Volunteering in England

Why does the Betti number give the measure of k-dimensional holes?

In the time of the mishna, were there Jewish cities without courts?

Is thermodynamics only applicable to systems in equilibrium?

Confusion about capacitors

Why does Bran Stark feel that Jon Snow "needs to know" about his lineage?

When to use 1/Ka vs Kb

Is it cheaper to drop cargo drop than to land it?

Binary Numbers Magic Trick

What word means to make something obsolete?

Weird result in complex limit

You look catfish vs You look like a catfish

If Earth is tilted, why is Polaris always above the same spot?

Given what happens in Endgame, why doesn't Dormammu come back to attack the universe?

How do I tell my manager that he's wrong?

Why was Germany not as successful as other Europeans in establishing overseas colonies?

How to pass attribute when redirecting from lwc to aura component

Modify locally tikzset



Making Prediction on logistic regression using SAS


Stochastic gradient descent in logistic regressionPython : How to use Multinomial Logistic Regression using SKlearnImbalanced Data how to use random forest to select important variables?How can I use machine learning methods on modelling time series data?Explain output of logistic classifierDisplaying date in SASHow much data is needed for a GBM to be more reliable than logistic regression for binary classification?Need Advice, Classification Problem in Python: Should I use Decision tree, Random Forests, or Logistic Regression?Multi-Class Classification With Logistic Regression On Binary DataDrop NA Values with SAS













0












$begingroup$


proc logistic data= train descending;
class Emp_status Gender Marital_status;
model Default = Checking_amount Term Credit_score Gender Marital_status
Car_loan Personal_loan Home_loan Education_loan Emp_status
Amount Saving_amount Emp_duration Age No_of_credit_acc;
run;


As you can see, I already made a logistic regression on train dataset. However, how can I make the prediction on the test dataset? I checked online, but there are not many sources to implement this.










share|improve this question









$endgroup$
















    0












    $begingroup$


    proc logistic data= train descending;
    class Emp_status Gender Marital_status;
    model Default = Checking_amount Term Credit_score Gender Marital_status
    Car_loan Personal_loan Home_loan Education_loan Emp_status
    Amount Saving_amount Emp_duration Age No_of_credit_acc;
    run;


    As you can see, I already made a logistic regression on train dataset. However, how can I make the prediction on the test dataset? I checked online, but there are not many sources to implement this.










    share|improve this question









    $endgroup$














      0












      0








      0





      $begingroup$


      proc logistic data= train descending;
      class Emp_status Gender Marital_status;
      model Default = Checking_amount Term Credit_score Gender Marital_status
      Car_loan Personal_loan Home_loan Education_loan Emp_status
      Amount Saving_amount Emp_duration Age No_of_credit_acc;
      run;


      As you can see, I already made a logistic regression on train dataset. However, how can I make the prediction on the test dataset? I checked online, but there are not many sources to implement this.










      share|improve this question









      $endgroup$




      proc logistic data= train descending;
      class Emp_status Gender Marital_status;
      model Default = Checking_amount Term Credit_score Gender Marital_status
      Car_loan Personal_loan Home_loan Education_loan Emp_status
      Amount Saving_amount Emp_duration Age No_of_credit_acc;
      run;


      As you can see, I already made a logistic regression on train dataset. However, how can I make the prediction on the test dataset? I checked online, but there are not many sources to implement this.







      logistic-regression prediction sas






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 9 at 1:41









      TomTom

      91111




      91111




















          1 Answer
          1






          active

          oldest

          votes


















          1












          $begingroup$

          proc surveyselect data=work.data method=srs seed=2 outall
          samprate=0.7 out=work.data_subset;

          data training;
          set work.data_subset; *dataset in your work directory;
          if selected = 1;
          run;

          data testing;
          set work.data_subset; *dataset in your working directory;
          if selected = 0;
          run;

          ods graphics on;
          proc logistic data=work.training descending plots=roc;
          class Gender /param = effect ref = first; *categorical variable;
          model default = x1 x2 x3 x4 x5
          / link=logit;
          score data=work.testing out=work.logisticOoutput;
          run;
          ods graphics off;


          Using proc surveyselect to split the dataset 70% 30%, we can split our dataset into train and test. Then, we can run logistic regression on train data. see the performance on the test dataset.



          score data=work.testing 


          This command is running the regression on the test set. see the result in the output.






          share|improve this answer









          $endgroup$













            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "557"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48925%2fmaking-prediction-on-logistic-regression-using-sas%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1












            $begingroup$

            proc surveyselect data=work.data method=srs seed=2 outall
            samprate=0.7 out=work.data_subset;

            data training;
            set work.data_subset; *dataset in your work directory;
            if selected = 1;
            run;

            data testing;
            set work.data_subset; *dataset in your working directory;
            if selected = 0;
            run;

            ods graphics on;
            proc logistic data=work.training descending plots=roc;
            class Gender /param = effect ref = first; *categorical variable;
            model default = x1 x2 x3 x4 x5
            / link=logit;
            score data=work.testing out=work.logisticOoutput;
            run;
            ods graphics off;


            Using proc surveyselect to split the dataset 70% 30%, we can split our dataset into train and test. Then, we can run logistic regression on train data. see the performance on the test dataset.



            score data=work.testing 


            This command is running the regression on the test set. see the result in the output.






            share|improve this answer









            $endgroup$

















              1












              $begingroup$

              proc surveyselect data=work.data method=srs seed=2 outall
              samprate=0.7 out=work.data_subset;

              data training;
              set work.data_subset; *dataset in your work directory;
              if selected = 1;
              run;

              data testing;
              set work.data_subset; *dataset in your working directory;
              if selected = 0;
              run;

              ods graphics on;
              proc logistic data=work.training descending plots=roc;
              class Gender /param = effect ref = first; *categorical variable;
              model default = x1 x2 x3 x4 x5
              / link=logit;
              score data=work.testing out=work.logisticOoutput;
              run;
              ods graphics off;


              Using proc surveyselect to split the dataset 70% 30%, we can split our dataset into train and test. Then, we can run logistic regression on train data. see the performance on the test dataset.



              score data=work.testing 


              This command is running the regression on the test set. see the result in the output.






              share|improve this answer









              $endgroup$















                1












                1








                1





                $begingroup$

                proc surveyselect data=work.data method=srs seed=2 outall
                samprate=0.7 out=work.data_subset;

                data training;
                set work.data_subset; *dataset in your work directory;
                if selected = 1;
                run;

                data testing;
                set work.data_subset; *dataset in your working directory;
                if selected = 0;
                run;

                ods graphics on;
                proc logistic data=work.training descending plots=roc;
                class Gender /param = effect ref = first; *categorical variable;
                model default = x1 x2 x3 x4 x5
                / link=logit;
                score data=work.testing out=work.logisticOoutput;
                run;
                ods graphics off;


                Using proc surveyselect to split the dataset 70% 30%, we can split our dataset into train and test. Then, we can run logistic regression on train data. see the performance on the test dataset.



                score data=work.testing 


                This command is running the regression on the test set. see the result in the output.






                share|improve this answer









                $endgroup$



                proc surveyselect data=work.data method=srs seed=2 outall
                samprate=0.7 out=work.data_subset;

                data training;
                set work.data_subset; *dataset in your work directory;
                if selected = 1;
                run;

                data testing;
                set work.data_subset; *dataset in your working directory;
                if selected = 0;
                run;

                ods graphics on;
                proc logistic data=work.training descending plots=roc;
                class Gender /param = effect ref = first; *categorical variable;
                model default = x1 x2 x3 x4 x5
                / link=logit;
                score data=work.testing out=work.logisticOoutput;
                run;
                ods graphics off;


                Using proc surveyselect to split the dataset 70% 30%, we can split our dataset into train and test. Then, we can run logistic regression on train data. see the performance on the test dataset.



                score data=work.testing 


                This command is running the regression on the test set. see the result in the output.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 20 at 0:28









                TomTom

                91111




                91111



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Data Science Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48925%2fmaking-prediction-on-logistic-regression-using-sas%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                    Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

                    Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High