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

                    Are all passive ability checks floors for active ability checks?Does passive perception supersede active perception?Which skills can be used passively?Active Opposition with Free-Form Professions in Fate5E Trap/Ambush/Stealth Mechanics VS Passive Perception ConfusionInteraction between perception and stealth in obscured conditionsHow does Keen Sight affect Passive Perception?Are all d20 rolls either attacks, saves or ability checks?Can players declare that they are making a specific ability check?Can I see a Hidden creature that is not obscured at all?Can a Stealth check ever be made passively?Is this alternate version of the Observant feat balanced?What is the minimum amount of skill points per HD?

                    How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraDealing with clients who want more than what's in the contractHow to prepare for a client visit?How to handle undeservedly positive feedbackSupervisor apparently making it appear that our team underperformed and we indirectly caused client not to pay fullHow to progress my skills development as both the technical lead and youngest member on my team?Under performing employee will be fired if I ask for him off my teamwhat recommendations can I give to a colleague who is not preforming as well as expectedForcing usage of clients laptops because of VPN accessIs it acceptable to e-mail a client regarding potential opportunities in their company?Am I overly concerned about a newly hired Senior Developer with low performance?

                    Operational amplifier basicsNegative feedback- noninverting voltage amplifierHow to set the input impedance of an inverting amplifierInput impedance of a non-inverting op-ampWhy altering open loop gain is necessary in amplifier's frequency compensation..?Transistor current control with positive feedback differential amplifierVirtual Ground Paradox?In closed loop configuration of op-amp,what happens to open loop gain?Why is the output of the precision rectifier 0 when the diode does not conduct?Stability of op-amps: “Oscillations if phase = 180° and loop gain > 1” questionHow to identify the circuit has negative feedback or positive feedback?