Re: Application of Rule set in SPSS Logistic Regression

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

Richard AK
My apologies I would like to use the Logistic Regression NOT the decision tree

On Wed, Mar 13, 2013 at 12:46 PM, Richard AK <[hidden email]> wrote:
Hi team,

We are using SPSS Statistics 19.

We have a two independent data sets with me : 1) Actual Data  (5k records) 2) Open Data (2k records)

From one of the dichotomous variable I would be predicting my Win/Loss ratios on the actual data and would be checking on the actual results of it.  If we are able to get model accuracy at >70%, we would be taking those rule set and would be predicting the Open data results. 

We know that, we can carry out this procedure using SPSS Modeler, but unfortunately we don't have the license for the same. 

My queries are:

1). How to save the results/rules from the Actual data? and in which format?
2). And how to apply the rules on the Open Data?
3). How to use the same by using the Logistic Regression?


Sharing a syntax is appreciable.

Thanks,
Richard.


Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

David Marso
Administrator
Rules?  LR does NOT have any rules per se it is an EQUATION.
Anyhow: From the FM:
SELECT Subcommand
By default, all cases in the active dataset are considered for inclusion in LOGISTIC REGRESSION.
Use the optional SELECT subcommand to include a subset of cases in the analysis.
 The specification is either a logical expression or keyword ALL. ALL is the default. Variables
that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot appear on
SELECT.
 In the logical expression on SELECT, the relation can be EQ, NE, LT, LE, GT, or GE. The
variable must be numeric, and the value can be any number.
Only cases for which the logical expression on SELECT is true are included in calculations.
All other cases, including those cases with missing values for the variable that is named on
SELECT, are unselected.
Diagnostic statistics and classification statistics are reported for both selected and unselected
cases.

 Cases that are deleted from the active dataset with the SELECT IF or SAMPLE command are
not included among either the selected or unselected cases.
Richard AK wrote
My apologies I would like to use the Logistic Regression NOT the decision
tree

On Wed, Mar 13, 2013 at 12:46 PM, Richard AK <[hidden email]>wrote:

> Hi team,
>
> We are using SPSS Statistics 19.
>
> We have a two independent data sets with me : 1) Actual Data  (5k records)
> 2) Open Data (2k records)
>
> From one of the dichotomous variable I would be predicting my Win/Loss
> ratios on the actual data and would be checking on the actual results of
> it.  If we are able to get model accuracy at >70%, we would be taking those
> rule set and would be predicting the Open data results.
>
> We know that, we can carry out this procedure using SPSS Modeler, but
> unfortunately we don't have the license for the same.
>
> *My queries are:*
> *
> *
> 1). How to save the results/rules from the Actual data? and in which
> format?
> 2). And how to apply the rules on the Open Data?
> 3). How to use the same by using the Logistic Regression?
>
>
> Sharing a syntax is appreciable.
>
> Thanks,
> Richard.
>
>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

Richard AK
Hi David, 

I messed it up b/w Logistic and Decision tree. 

YOU are correct. I meant how to apply the logistic equation received through the Actual data on OPEN data using SPSS Statistics. 

Thanks for your suggestion. I have tried the SELECT Subcommand but not able it is throwing an error there are no cases to run subcommand. 

Thanks,
Richard


On Wed, Mar 13, 2013 at 2:56 PM, David Marso <[hidden email]> wrote:
Rules?  LR does NOT have any rules per se it is an EQUATION.
Anyhow: From the FM:
*SELECT Subcommand*
By default, all cases in the active dataset are considered for inclusion in
LOGISTIC REGRESSION.
Use the optional SELECT subcommand to include a subset of cases in the
analysis.
 The specification is either a logical expression or keyword ALL. ALL is
the default. Variables
that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
appear on
SELECT.
 In the logical expression on SELECT, the relation can be EQ, NE, LT, LE,
GT, or GE. The
variable must be numeric, and the value can be any number.
 *Only cases for which the logical expression on SELECT is true are
included in calculations.*
All other cases, including those cases with missing values for the variable
that is named on
SELECT, are unselected.
 *Diagnostic statistics and classification statistics are reported for both
selected and unselected
cases.*
 Cases that are deleted from the active dataset with the SELECT IF or
SAMPLE command are
not included among either the selected or unselected cases.

Richard AK wrote
> My apologies I would like to use the Logistic Regression NOT the decision
> tree
>
> On Wed, Mar 13, 2013 at 12:46 PM, Richard AK &lt;

> richard.ak2008@

> &gt;wrote:
>
>> Hi team,
>>
>> We are using SPSS Statistics 19.
>>
>> We have a two independent data sets with me : 1) Actual Data  (5k
>> records)
>> 2) Open Data (2k records)
>>
>> From one of the dichotomous variable I would be predicting my Win/Loss
>> ratios on the actual data and would be checking on the actual results of
>> it.  If we are able to get model accuracy at >70%, we would be taking
>> those
>> rule set and would be predicting the Open data results.
>>
>> We know that, we can carry out this procedure using SPSS Modeler, but
>> unfortunately we don't have the license for the same.
>>
>> *My queries are:*
>> *
>> *
>> 1). How to save the results/rules from the Actual data? and in which
>> format?
>> 2). And how to apply the rules on the Open Data?
>> 3). How to use the same by using the Logistic Regression?
>>
>>
>> Sharing a syntax is appreciable.
>>
>> Thanks,
>> Richard.
>>
>>





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

David Marso
Administrator
Something like <untested>
ADD FILES / FILE 'trainingdata' / IN=TRAINING/FILE 'applytodataset' .
LOG REG ...../SELECT TRAINING EQ 1 / SAVE ....
File in the ...
HTH, David

Richard AK wrote
Hi David,

I messed it up b/w Logistic and Decision tree.

YOU are correct. I meant how to *apply* the logistic equation received
through the Actual data on OPEN data using SPSS Statistics.

Thanks for your suggestion. I have tried the SELECT Subcommand but not able
it is throwing an error there are no cases to run subcommand.

Thanks,
Richard


On Wed, Mar 13, 2013 at 2:56 PM, David Marso <[hidden email]> wrote:

> Rules?  LR does NOT have any rules per se it is an EQUATION.
> Anyhow: From the FM:
> *SELECT Subcommand*
> By default, all cases in the active dataset are considered for inclusion in
> LOGISTIC REGRESSION.
> Use the optional SELECT subcommand to include a subset of cases in the
> analysis.
>  The specification is either a logical expression or keyword ALL. ALL is
> the default. Variables
> that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
> appear on
> SELECT.
>  In the logical expression on SELECT, the relation can be EQ, NE, LT, LE,
> GT, or GE. The
> variable must be numeric, and the value can be any number.
>  *Only cases for which the logical expression on SELECT is true are
> included in calculations.*
> All other cases, including those cases with missing values for the variable
> that is named on
> SELECT, are unselected.
>  *Diagnostic statistics and classification statistics are reported for
> both
> selected and unselected
> cases.*
>  Cases that are deleted from the active dataset with the SELECT IF or
> SAMPLE command are
> not included among either the selected or unselected cases.
>
> Richard AK wrote
> > My apologies I would like to use the Logistic Regression NOT the decision
> > tree
> >
> > On Wed, Mar 13, 2013 at 12:46 PM, Richard AK <
>
> > richard.ak2008@
>
> > >wrote:
> >
> >> Hi team,
> >>
> >> We are using SPSS Statistics 19.
> >>
> >> We have a two independent data sets with me : 1) Actual Data  (5k
> >> records)
> >> 2) Open Data (2k records)
> >>
> >> From one of the dichotomous variable I would be predicting my Win/Loss
> >> ratios on the actual data and would be checking on the actual results of
> >> it.  If we are able to get model accuracy at >70%, we would be taking
> >> those
> >> rule set and would be predicting the Open data results.
> >>
> >> We know that, we can carry out this procedure using SPSS Modeler, but
> >> unfortunately we don't have the license for the same.
> >>
> >> *My queries are:*
> >> *
> >> *
> >> 1). How to save the results/rules from the Actual data? and in which
> >> format?
> >> 2). And how to apply the rules on the Open Data?
> >> 3). How to use the same by using the Logistic Regression?
> >>
> >>
> >> Sharing a syntax is appreciable.
> >>
> >> Thanks,
> >> Richard.
> >>
> >>
>
>
>
>
>
> -----
> Please reply to the list and not to my personal email.
> Those desiring my consulting or training services please feel free to
> email me.
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

Jon K Peck
In reply to this post by David Marso
You can save your model as PMML and then use the Scoring Wizard on the Utilities menu to apply it to a new dataset.  This works for any type of model that can be saved as PMML.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        David Marso <[hidden email]>
To:        [hidden email],
Date:        03/13/2013 03:26 AM
Subject:        Re: [SPSSX-L] Application of Rule set in SPSS Logistic Regression
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Rules?  LR does NOT have any rules per se it is an EQUATION.
Anyhow: From the FM:
*SELECT Subcommand*
By default, all cases in the active dataset are considered for inclusion in
LOGISTIC REGRESSION.
Use the optional SELECT subcommand to include a subset of cases in the
analysis.
�� The specification is either a logical expression or keyword ALL. ALL is
the default. Variables
that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
appear on
SELECT.
�� In the logical expression on SELECT, the relation can be EQ, NE, LT, LE,
GT, or GE. The
variable must be numeric, and the value can be any number.
�� *Only cases for which the logical expression on SELECT is true are
included in calculations.*
All other cases, including those cases with missing values for the variable
that is named on
SELECT, are unselected.
�� *Diagnostic statistics and classification statistics are reported for both
selected and unselected
cases.*
�� Cases that are deleted from the active dataset with the SELECT IF or
SAMPLE command are
not included among either the selected or unselected cases.

Richard AK wrote
> My apologies I would like to use the Logistic Regression NOT the decision
> tree
>
> On Wed, Mar 13, 2013 at 12:46 PM, Richard AK &lt;

> richard.ak2008@

> &gt;wrote:
>
>> Hi team,
>>
>> We are using SPSS Statistics 19.
>>
>> We have a two independent data sets with me : 1) Actual Data  (5k
>> records)
>> 2) Open Data (2k records)
>>
>> From one of the dichotomous variable I would be predicting my Win/Loss
>> ratios on the actual data and would be checking on the actual results of
>> it.  If we are able to get model accuracy at >70%, we would be taking
>> those
>> rule set and would be predicting the Open data results.
>>
>> We know that, we can carry out this procedure using SPSS Modeler, but
>> unfortunately we don't have the license for the same.
>>
>> *My queries are:*
>> *
>> *
>> 1). How to save the results/rules from the Actual data? and in which
>> format?
>> 2). And how to apply the rules on the Open Data?
>> 3). How to use the same by using the Logistic Regression?
>>
>>
>> Sharing a syntax is appreciable.
>>
>> Thanks,
>> Richard.
>>
>>





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

Peter Spangler
In reply to this post by David Marso
Predicting a dichotomous variable using continuous and categorical variables, Would CONTRAST (VAR)=Indicator be required when using a SELECT function?

I too am working with various categorical and continuous variables in logistic regression. Is the LOGISTIC REGRESSION syntax creating a preferred view, does it save time with dummy variables? Having used it through the GUI I'm interested to learn more.  

On Wed, Mar 13, 2013 at 4:53 AM, David Marso <[hidden email]> wrote:
Something like <untested>
ADD FILES / FILE 'trainingdata' / IN=TRAINING/FILE 'applytodataset' .
LOG REG ...../SELECT TRAINING EQ 1 / SAVE ....
File in the ...
HTH, David


Richard AK wrote
> Hi David,
>
> I messed it up b/w Logistic and Decision tree.
>
> YOU are correct. I meant how to *apply* the logistic equation received
> through the Actual data on OPEN data using SPSS Statistics.
>
> Thanks for your suggestion. I have tried the SELECT Subcommand but not
> able
> it is throwing an error there are no cases to run subcommand.
>
> Thanks,
> Richard
>
>
> On Wed, Mar 13, 2013 at 2:56 PM, David Marso &lt;

> david.marso@

> &gt; wrote:
>
>> Rules?  LR does NOT have any rules per se it is an EQUATION.
>> Anyhow: From the FM:
>> *SELECT Subcommand*
>> By default, all cases in the active dataset are considered for inclusion
>> in
>> LOGISTIC REGRESSION.
>> Use the optional SELECT subcommand to include a subset of cases in the
>> analysis.
>>  The specification is either a logical expression or keyword ALL. ALL is
>> the default. Variables
>> that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
>> appear on
>> SELECT.
>>  In the logical expression on SELECT, the relation can be EQ, NE, LT,
>> LE,
>> GT, or GE. The
>> variable must be numeric, and the value can be any number.
>>  *Only cases for which the logical expression on SELECT is true are
>> included in calculations.*
>> All other cases, including those cases with missing values for the
>> variable
>> that is named on
>> SELECT, are unselected.
>>  *Diagnostic statistics and classification statistics are reported for
>> both
>> selected and unselected
>> cases.*
>>  Cases that are deleted from the active dataset with the SELECT IF or
>> SAMPLE command are
>> not included among either the selected or unselected cases.
>>
>> Richard AK wrote
>> > My apologies I would like to use the Logistic Regression NOT the
>> decision
>> > tree
>> >
>> > On Wed, Mar 13, 2013 at 12:46 PM, Richard AK &lt;
>>
>> > richard.ak2008@
>>
>> > &gt;wrote:
>> >
>> >> Hi team,
>> >>
>> >> We are using SPSS Statistics 19.
>> >>
>> >> We have a two independent data sets with me : 1) Actual Data  (5k
>> >> records)
>> >> 2) Open Data (2k records)
>> >>
>> >> From one of the dichotomous variable I would be predicting my Win/Loss
>> >> ratios on the actual data and would be checking on the actual results
>> of
>> >> it.  If we are able to get model accuracy at >70%, we would be taking
>> >> those
>> >> rule set and would be predicting the Open data results.
>> >>
>> >> We know that, we can carry out this procedure using SPSS Modeler, but
>> >> unfortunately we don't have the license for the same.
>> >>
>> >> *My queries are:*
>> >> *
>> >> *
>> >> 1). How to save the results/rules from the Actual data? and in which
>> >> format?
>> >> 2). And how to apply the rules on the Open Data?
>> >> 3). How to use the same by using the Logistic Regression?
>> >>
>> >>
>> >> Sharing a syntax is appreciable.
>> >>
>> >> Thanks,
>> >> Richard.
>> >>
>> >>
>>
>>
>>
>>
>>
>> -----
>> Please reply to the list and not to my personal email.
>> Those desiring my consulting or training services please feel free to
>> email me.
>> --
>> View this message in context:
>> http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718612.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

David Marso
Administrator
In reply to this post by Jon K Peck

TRUE!
Time for this old dog to learn new tricks ;-)
--Jon, What would the syntax be?  I only have Base 21 so maybe not even applicable here (for me)--
Jon K Peck wrote
You can save your model as PMML and then use the Scoring Wizard on the
Utilities menu to apply it to a new dataset.  This works for any type of
model that can be saved as PMML.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:   David Marso <[hidden email]>
To:     [hidden email],
Date:   03/13/2013 03:26 AM
Subject:        Re: [SPSSX-L] Application of Rule set in SPSS Logistic
Regression
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Rules?  LR does NOT have any rules per se it is an EQUATION.
Anyhow: From the FM:
*SELECT Subcommand*
By default, all cases in the active dataset are considered for inclusion
in
LOGISTIC REGRESSION.
Use the optional SELECT subcommand to include a subset of cases in the
analysis.
� The specification is either a logical expression or keyword ALL. ALL is
the default. Variables
that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
appear on
SELECT.
� In the logical expression on SELECT, the relation can be EQ, NE, LT,
LE,
GT, or GE. The
variable must be numeric, and the value can be any number.
� *Only cases for which the logical expression on SELECT is true are
included in calculations.*
All other cases, including those cases with missing values for the
variable
that is named on
SELECT, are unselected.
� *Diagnostic statistics and classification statistics are reported for
both
selected and unselected
cases.*
� Cases that are deleted from the active dataset with the SELECT IF or
SAMPLE command are
not included among either the selected or unselected cases.

Richard AK wrote
> My apologies I would like to use the Logistic Regression NOT the
decision
> tree
>
> On Wed, Mar 13, 2013 at 12:46 PM, Richard AK <

> richard.ak2008@

> >wrote:
>
>> Hi team,
>>
>> We are using SPSS Statistics 19.
>>
>> We have a two independent data sets with me : 1) Actual Data  (5k
>> records)
>> 2) Open Data (2k records)
>>
>> From one of the dichotomous variable I would be predicting my Win/Loss
>> ratios on the actual data and would be checking on the actual results
of
>> it.  If we are able to get model accuracy at >70%, we would be taking
>> those
>> rule set and would be predicting the Open data results.
>>
>> We know that, we can carry out this procedure using SPSS Modeler, but
>> unfortunately we don't have the license for the same.
>>
>> *My queries are:*
>> *
>> *
>> 1). How to save the results/rules from the Actual data? and in which
>> format?
>> 2). And how to apply the rules on the Open Data?
>> 3). How to use the same by using the Logistic Regression?
>>
>>
>> Sharing a syntax is appreciable.
>>
>> Thanks,
>> Richard.
>>
>>





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to
email me.
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

Jon K Peck
This is in Base.  The scoring wizard generates a COMPUTE statement using the APPLYMODEL function.  This is the start of the help topic.

Scoring expressions

Scoring expressions apply model XML from an external file to the active dataset and generate predicted values, predicted probabilities, and other values based on that model.

• Scoring expressions must be preceded by a MODEL HANDLE command that identifies the external XML model file and optionally does variable mapping.

• Scoring expressions require two arguments: the first identifies the model, and the second identifies the scoring function. An optional third argument allows users to obtain the probability (for each case) associated with a selected category, in the case of a categorical target variable. It is also used in nearest neighbor models to specify a particular neighbor.

• Prior to applying scoring functions to a set of data, a data validation analysis is performed. The analysis includes checking that data are of the correct type as well as checking that the data values are in the set of allowed values defined in the model. For example, for categorical variables, a value that is neither a valid category nor defined as user-missing would be treated as an invalid value. Values that are found to be invalid are treated as system-missing.

The following scoring expressions are available:

ApplyModel. ApplyModel(handle, "function", value). Numeric. Applies a particular scoring function to the input case data using the model specified by handle and where "function" is one of the following string literal values enclosed in quotes: predict, stddev, probability, confidence, nodeid, cumhazard, neighbor, distance. The model handle is the name associated with the external XML file, as defined on the MODEL HANDLE command. The optional third argument applies when the function is "probability", "neighbor", or "distance". For "probability", it specifies a category for which the probability is calculated. For "neighbor" and "distance", it specifies a particular neighbor (as an integer) for nearest neighbor models. ApplyModel returns system-missing if a value can not be computed. String values must be enclosed in quotes. For example, ApplyModel(name1, ‘probability’, ‘reject’), where name1 is the model’s handle name and ‘reject’ is a valid category for a target variable that is a string.

StrApplyModel. StrApplyModel(handle, "function", value). String. Applies a particular scoring function to the input case data using the model specified by handle and where "function" is one of the following string literal values enclosed in quotes: predict, stddev, probability, confidence, nodeid, cumhazard, neighbor, distance. The model handle is the name associated with the external XML file, as defined on the MODEL HANDLE command. The optional third argument applies when the function is "probability", "neighbor", or "distance". For "probability", it specifies a category for which the probability is calculated. For "neighbor" and "distance", it specifies a particular neighbor (as an integer) for nearest neighbor models. StrApplyModel returns a blank string if a value cannot be computed.

The following scoring functions are available:

...


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        David Marso <[hidden email]>
To:        [hidden email],
Date:        03/13/2013 02:31 PM
Subject:        Re: [SPSSX-L] Application of Rule set in SPSS Logistic Regression
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





TRUE!
Time for this old dog to learn new tricks ;-)
--Jon, What would the syntax be?  I only have Base 21 so maybe not even
applicable here (for me)--

Jon K Peck wrote
> You can save your model as PMML and then use the Scoring Wizard on the
> Utilities menu to apply it to a new dataset.  This works for any type of
> model that can be saved as PMML.
>
>
> Jon Peck (no "h") aka Kim
> Senior Software Engineer, IBM

> peck@.ibm

> phone: 720-342-5621
>
>
>
>
> From:   David Marso &lt;

> david.marso@

> &gt;
> To:

> SPSSX-L@.uga

> ,
> Date:   03/13/2013 03:26 AM
> Subject:        Re: [SPSSX-L] Application of Rule set in SPSS Logistic
> Regression
> Sent by:        "SPSSX(r) Discussion" &lt;

> SPSSX-L@.uga

> &gt;
>
>
>
> Rules?  LR does NOT have any rules per se it is an EQUATION.
> Anyhow: From the FM:
> *SELECT Subcommand*
> By default, all cases in the active dataset are considered for inclusion
> in
> LOGISTIC REGRESSION.
> Use the optional SELECT subcommand to include a subset of cases in the
> analysis.
> � The specification is either a logical expression or keyword ALL. ALL is
> the default. Variables
> that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot
> appear on
> SELECT.
> � In the logical expression on SELECT, the relation can be EQ, NE, LT,
> LE,
> GT, or GE. The
> variable must be numeric, and the value can be any number.
> � *Only cases for which the logical expression on SELECT is true are
> included in calculations.*
> All other cases, including those cases with missing values for the
> variable
> that is named on
> SELECT, are unselected.
> � *Diagnostic statistics and classification statistics are reported for
> both
> selected and unselected
> cases.*
> � Cases that are deleted from the active dataset with the SELECT IF or
> SAMPLE command are
> not included among either the selected or unselected cases.
>
> Richard AK wrote
>> My apologies I would like to use the Logistic Regression NOT the
> decision
>> tree
>>
>> On Wed, Mar 13, 2013 at 12:46 PM, Richard AK &lt;
>
>> richard.ak2008@
>
>> &gt;wrote:
>>
>>> Hi team,
>>>
>>> We are using SPSS Statistics 19.
>>>
>>> We have a two independent data sets with me : 1) Actual Data  (5k
>>> records)
>>> 2) Open Data (2k records)
>>>
>>> From one of the dichotomous variable I would be predicting my Win/Loss
>>> ratios on the actual data and would be checking on the actual results
> of
>>> it.  If we are able to get model accuracy at >70%, we would be taking
>>> those
>>> rule set and would be predicting the Open data results.
>>>
>>> We know that, we can carry out this procedure using SPSS Modeler, but
>>> unfortunately we don't have the license for the same.
>>>
>>> *My queries are:*
>>> *
>>> *
>>> 1). How to save the results/rules from the Actual data? and in which
>>> format?
>>> 2). And how to apply the rules on the Open Data?
>>> 3). How to use the same by using the Logistic Regression?
>>>
>>>
>>> Sharing a syntax is appreciable.
>>>
>>> Thanks,
>>> Richard.
>>>
>>>
>
>
>
>
>
> -----
> Please reply to the list and not to my personal email.
> Those desiring my consulting or training services please feel free to
> email me.
> --
> View this message in context:
>
http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718608.html
>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Re-Application-of-Rule-set-in-SPSS-Logistic-Regression-tp5718607p5718631.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: Application of Rule set in SPSS Logistic Regression

David Marso
Administrator
Thanks Jon,
Jon K Peck wrote
This is in Base.  The scoring wizard generates a COMPUTE statement using
the APPLYMODEL function.  This is the start of the help topic.
[SNIP]
...
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"