Variable name errors?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 2
Joined: Sun Oct 16, 2011 3:53 am

Variable name errors?

Postby ScottK » Sun Oct 16, 2011 5:06 am

I'm using SPSS 19.

I'm new to the forums and SPSS so please don't think you're being too pedantic with me, I appreciate any guidance that you might think is obvious.

The background is that I'm trying to use existing data collected over multiple 24 hour periods to create a cosinor curve that describes how much melatonin is present in the blood at any time over a 24 hour circuit. The variables involved listed under the model program statement are figured out by looking at the collected data before doing the abstraction. b= baseline value more or less the bottom value of melatonin, h=height which I think is the max value, f= the time at which the acrophase (top value) occurs in the 24 hour period, this value is expressed in radians. c= the width parameter, v=the skewness of the data (meaning how much faster does the curve go up than down (0.3 means slightly faster up than down), m= the bimodality. I should say I'm pretty comfortable that these values are OK.

What I'm not as sure about is the data file, the attributes the data source file should have, and how to write the output of this code. The data are essentially only time (measured in hours/minutes), and melatonin concentrations as observed in a live patient. I've labeled these two values as "time" and "melatonin" in the SPSS data editor as imported from excel. I've given both the "measure" scale, and called their roles input (for time) and both for melatonin. Is this a mistake? Do I want to read this melatonin observed value and write a different melatonin value (to create the cosine curve).

I'm trying to use the following code:
* Bimodal Skewed Baseline Cosine Function.
MODEL PROGRAM b = 1 h = 50 f = 0.6 c = 0.22 v = 0.3 m = 0.3.
COMPUTE PRED_ = b + ( h / ( 2 * ( 1 - c ) ) ) * ( cos ( x - f + v * cos ( x - f ) ) + m * cos ( 2 * x - 2 * f - 4 * ARTAN ( 1 ) ) - c + ABS ( cos ( x - f + v * cos ( x - f ) ) + m * cos ( 2 * x - 2 * f - 4 * ARTAN ( 1 ) ) - c ) ).
CNLR melatonin
/BOUNDS b >= 0; h >= 0; f >= 0; c < 1; c > -1; v < 1; v > -1; m < 1; m >= 0

and am running into two error messages. First, the COMPUTE line gets the following error: Incorrect variable name: either the name is more than 64 characters or it is not defined by a previous command.

Next, from the CNLR line I'm getting the following: Constrained Nonlinear Regression Analysis- Undefined Variable Name.

I have the feeling that I've somehow loused up the data file used to build the curve. Am I right? How do we fix this?

Finally I would appreciate a link that tells me exactly when to and when not to use spaces in these commands. How many spaces are needed in the COMPUTE PRED_ line?

Thanks so much for looking
You do not have the required permissions to view the files attached to this post.
Posts: 2
Joined: Sun Oct 16, 2011 3:53 am

Re: Variable name errors?

Postby ScottK » Tue Oct 18, 2011 6:19 am

Figured out what was wrong. Taking a second look at the model and compute statements together it became obvious that x was the odd man out. All other values were given values by the syntax code. X, should stand for time, changing the time variable name to x fixed the problem.

Who is online

Users browsing this forum: No registered users and 2 guests