Log Reg does not accept /METHOD

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

Log Reg does not accept /METHOD

Hector Maletta

I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:

 

Unknown variable name.

Execution of this command stops.

Unknown variable name.

 

The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:

 

LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single 

/categorical ecolprov bigtioc

/contrast (ecolprov) indicator (1)

/contrast (bigtioc) indicator (1)

/method =fstep (cond).

 

This works without /METHOD, and fails otherwise. What gives?

 

 Thanks in advance for any help.

 

Hector

Reply | Threaded
Open this post in threaded view
|

Re: Log Reg does not accept /METHOD

Dale Glaser
Hi Hector..wonder if it's a bug since I just recently used the method command in a hierarchical model and it worked fine...I just double-checked now and I had no error messages......do you think it might be if you don't have the most recent patch?......dale

Dale Glaser, Ph.D.
Principal--Glaser Consulting
Lecturer/Adjunct Faculty--SDSU/USD/Alliant
Past-President, San Diego Chapter of
American Statistical Association
3115 4th Avenue
San Diego, CA 92103
phone: 619-220-0602
fax: 619-220-0412
email: [hidden email]
website: www.glaserconsult.com

--- On Wed, 8/11/10, Hector Maletta <[hidden email]> wrote:

From: Hector Maletta <[hidden email]>
Subject: Log Reg does not accept /METHOD
To: [hidden email]
Date: Wednesday, August 11, 2010, 12:57 PM

I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:

 

Unknown variable name.

Execution of this command stops.

Unknown variable name.

 

The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:

 

LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single 

/categorical ecolprov bigtioc

/contrast (ecolprov) indicator (1)

/contrast (bigtioc) indicator (1)

/method =fstep (cond).

 

This works without /METHOD, and fails otherwise. What gives?

 

 Thanks in advance for any help.

 

Hector

Reply | Threaded
Open this post in threaded view
|

Re: Log Reg does not accept /METHOD

Rick Oliver-3
In reply to this post by Hector Maletta
Three may be something else going on here since you're not getting the error message I would expect, but the METHOD subcommand should include a list of independent variables. But if that were the only problem, you'd see an error message that says you need to specify variables on the METHOD subcommand.


From: Hector Maletta <[hidden email]>
To: [hidden email]
Date: 08/11/2010 02:59 PM
Subject: Log Reg does not accept /METHOD
Sent by: "SPSSX(r) Discussion" <[hidden email]>





I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:
 

Unknown variable name.
Execution of this command stops.
Unknown variable name.

 
The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:
 
LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  
/categorical ecolprov bigtioc
/contrast (ecolprov) indicator (1)
/contrast (bigtioc) indicator (1)
/method =fstep (cond).
 
This works without /METHOD, and fails otherwise. What gives?
 
 Thanks in advance for any help.
 
Hector

Reply | Threaded
Open this post in threaded view
|

Re: Log Reg does not accept /METHOD

Rick Oliver-3
In reply to this post by Hector Maletta
The simplest answer is probably to believe the error message. I think you may have misspelled one of your variable names, since this works:

dataset close all.
input program.
loop #i=1 to 100.
compute yearmom=rv.bernoulli (.5).
do repeat x=ecolprov bigtioc.
compute x=trunc(rv.uniform(1,6)).
end repeat.
do repeat x=urbarur climadem p29 educ single.
compute x=rv.normal(50,10).
end repeat.
end case.
end loop.
end file.
end input program.

LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  
/categorical ecolprov bigtioc
/contrast (ecolprov) indicator (1)
/contrast (bigtioc) indicator (1)
/method =fstep (cond).





From: "Hector Maletta" <[hidden email]>
To: Rick Oliver/Chicago/IBM@IBMUS, <[hidden email]>
Cc: <[hidden email]>
Date: 08/11/2010 03:28 PM
Subject: RE: Log Reg does not accept /METHOD





Rick,
If all variables mentioned in the VARIABLES subcommand are included in the /METHOD subcommand, no variable list is (apparently) needed. However, I have tried the command with and without a variable list included in it, with the same result. And as you point out, the message would be different if that was the origin of the error. I was in fact surprised that my error message does not appear to be an error message but a mere warning (and those ordinarily don’t stop commands to be executed), and also surprised that no variables are named when the warning is that an unknown variable was included. Weird indeed.
 
Dale Glaser might have a point: possibly a bug to be fixed by a patch. But to my knowledge nobody has ever mentioned such a bug. Perhaps some friend at SPSS may clarify this.
 
Hector
 
 
From: Rick Oliver [mailto:oliverr@...]
Sent:
Wednesday, August 11, 2010 5:13 PM
To:
Hector Maletta
CC:
[hidden email]
Subject:
Re: Log Reg does not accept /METHOD

 
Three may be something else going on here since you're not getting the error message I would expect, but the METHOD subcommand should include a list of independent variables. But if that were the only problem, you'd see this error message:


From: Hector Maletta <[hidden email]>
To: [hidden email]
Date: 08/11/2010 02:59 PM
Subject: Log Reg does not accept /METHOD
Sent by: "SPSSX(r) Discussion" <[hidden email]>

 






I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:

 

Unknown variable name.
Execution of this command stops.
Unknown variable name.


 

The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:

 
LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  

/categorical ecolprov bigtioc

/contrast (ecolprov) indicator (1)

/contrast (bigtioc) indicator (1)

/method =fstep (cond).

 
This works without /METHOD, and fails otherwise. What gives?

 
Thanks in advance for any help.

 
Hector

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG -
www.avg.es
Versión: 8.5.441 / Base de datos de virus: 271.1.1/3064 - Fecha de la versión: 08/11/10 06:34:00

Reply | Threaded
Open this post in threaded view
|

Re: Log Reg does not accept /METHOD

Rick Oliver-3
In reply to this post by Hector Maletta
Then I'm stumped. My example, using your logistic regression syntax, works fine for me in release 18, Do you get the same error message when you run my example?


From: "Hector Maletta" <[hidden email]>
To: Rick Oliver/Chicago/IBM@IBMUS
Cc: <[hidden email]>, <[hidden email]>
Date: 08/11/2010 03:50 PM
Subject: RE: Log Reg does not accept /METHOD





Nope. All variable names are right, directly copied from the variable list.
Hector
 
De: Rick Oliver [mailto:oliverr@...]
Enviado el:
Wednesday, August 11, 2010 5:43 PM
Para:
Hector Maletta
CC:
[hidden email]; [hidden email]
Asunto:
RE: Log Reg does not accept /METHOD

 
Ah. The simplest explanation is to believe the error message. I think you probably got one of the variable names wrong.

I created some fake data with your variable names, and your syntax runs fine...


dataset close all.

input program.

loop #i=1 to 100.

compute yearmom=rv.bernoulli (.5).

do repeat x=ecolprov bigtioc.

compute x=trunc(rv.uniform(1,6)).

end repeat.

do repeat x=urbarur climadem p29 educ single.

compute x=rv.normal(50,10).

end repeat.

end case.

end loop.

end file.

end input program.


LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  
/categorical ecolprov bigtioc
/contrast (ecolprov) indicator (1)
/contrast (bigtioc) indicator (1)
/method =fstep (cond).




From: "Hector Maletta" <[hidden email]>
To: Rick Oliver/Chicago/IBM@IBMUS, <[hidden email]>
Cc: <[hidden email]>
Date: 08/11/2010 03:28 PM
Subject: RE: Log Reg does not accept /METHOD

 






Rick,

If all variables mentioned in the VARIABLES subcommand are included in the /METHOD subcommand, no variable list is (apparently) needed. However, I have tried the command with and without a variable list included in it, with the same result. And as you point out, the message would be different if that was the origin of the error. I was in fact surprised that my error message does not appear to be an error message but a mere warning (and those ordinarily don’t stop commands to be executed), and also surprised that no variables are named when the warning is that an unknown variable was included. Weird indeed.

 
Dale Glaser might have a point: possibly a bug to be fixed by a patch. But to my knowledge nobody has ever mentioned such a bug. Perhaps some friend at SPSS may clarify this.

 
Hector

 
 
From:
Rick Oliver [
mailto:oliverr@...]
Sent:
Wednesday, August 11, 2010 5:13 PM
To:
Hector Maletta
CC:
[hidden email]
Subject:
Re: Log Reg does not accept /METHOD

 

Three may be something else going on here since you're not getting the error message I would expect, but the METHOD subcommand should include a list of independent variables. But if that were the only problem, you'd see this error message:


From: Hector Maletta <[hidden email]>
To: [hidden email]
Date: 08/11/2010 02:59 PM
Subject: Log Reg does not accept /METHOD
Sent by: "SPSSX(r) Discussion" <[hidden email]>


 


 






I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:

 

Unknown variable name.
Execution of this command stops.
Unknown variable name.



The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:


LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  

/categorical ecolprov bigtioc

/contrast (ecolprov) indicator (1)

/contrast (bigtioc) indicator (1)

/method =fstep (cond).


This works without /METHOD, and fails otherwise. What gives?


Thanks in advance for any help.


Hector

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG -
www.avg.es
Versión: 8.5.441 / Base de datos de virus: 271.1.1/3064 - Fecha de la versión: 08/11/10 06:34:00

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG -
www.avg.es
Versión: 8.5.441 / Base de datos de virus: 271.1.1/3064 - Fecha de la versión: 08/11/10 06:34:00

Reply | Threaded
Open this post in threaded view
|

Re: Log Reg does not accept /METHOD - spss case 731024

Hector Maletta
In reply to this post by Hector Maletta

Thanks to David and everybody. Problem overcome. It was apparently due to my not having installed the 18.0.2 patch. I installed the patch and the problem seemingly disappeared, even if couldn’t find mention of anything related to this in the 18.0.1 or 18.0.2 patch documentation.
 
Hector
 
De: David Matheson [[hidden email]]
Enviado el:
Wednesday, August 11, 2010 7:49 PM
Para:
Hector Maletta
Asunto:
Re: Log Reg does not accept /METHOD - spss case 731024

 

Hello Hector,

 I have been unable to replicate the problem in 18.0.2. There have been bugs in the past where similar errors were triggered by the presence in the data file of a variable which has the same name as  a keyword in the command, even if the variable and/or optional keyword were not used in that analysis. (Having a variable named METHOD did not trigger the error in my test.) Could you email me  a copy of the data file to see if I can replicate and diagnose further? If the data can't be sent, could you send the output from the following command?


display names / variables = all.


Which exact version of 18 are you running (Help->About)?


Thanks,


David Matheson

Statistical Support

SPSS, an IBM company

From:

Hector Maletta <[hidden email]>

To:

[hidden email]

Date:

08/11/2010 02:59 PM

Subject:

Log Reg does not accept /METHOD

Sent by:

"SPSSX(r) Discussion" <[hidden email]>


 

 






I am working with Logistic Regression, but the command (v. 18) apparently refuses to accept the /METHOD subcommand. It works fine without /METHOD. But whenever I include that subcommand, either to run a stepwise run, or to include multiple ENTER methods, or whatever, the following warning appears:

 

Unknown variable name.

Execution of this command stops.

Unknown variable name.


 
The dependent variable is binary. Predictors are interval measures plus two categorical variables. The general form of the syntax (with /METHOD included) is as follows:

 
LOGISTIC REGRESSION VARIABLES=yearmom WITH ecolprov urbarur   bigtioc climadem p29 educ single  

/categorical ecolprov bigtioc

/contrast (ecolprov) indicator (1)

/contrast (bigtioc) indicator (1)

/method =fstep (cond).

 
This works without /METHOD, and fails otherwise. What gives?

 
Thanks in advance for any help.

 
Hector

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG -
www.avg.es
Versión: 8.5.441 / Base de datos de virus: 271.1.1/3064 - Fecha de la versión: 08/11/10 06:34:00

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 8.5.441 / Base de datos de virus: 271.1.1/3064 - Fecha de la versión: 08/12/10 06:34:00