开发者

How to reference a specific row in the "compute variable" dialog of SPSS?

This is my problem:

I have a table of measured fluorescence values depending on a drug concentration. I can't use the values directly, because ev开发者_开发知识库en in absence of drug, there is some small fluorescence. Consequently, I have to substract the value from the drug=0 measurement from all other values.

I figured I could calculate a new variable (normalized fluorescence), but how do I reference to the fluorescence value in the drug=0 row? In excel, I'd use sth like $34$2 to reference to that field, but how to do that in SPSS? Entering the value "hard-coded" seems a bit unflexible, and I wanna know how to do it by reference :). Hours of googling and reading in books have yielded no answer so far.

Thanks :)

Edit: An example would be

Drug conc.  | Fluorescence
0           | 0.1  <- this value is to be substracted from all fluo values
1           | 1.1
2           | 2.1
3           | 3.1
4           | 4.1


Constant in SPSS can be represented as a variable with the same value for all rows. So you have to make a new variable with value of Fluorescence when drug=0. Example:

data list free
 /drug (f8) Fluorescence (f8.1).
begin data
0 0.1
1 1.1
2 2.1
3 3.1
4 4.1
end data.

sort cases drug.

do if drug = 0.
comp const = Fluorescence.
else.
comp const = lag(const).
end if.

exe.

comp Fluorescence2 = Fluorescence - const.

form const Fluorescence2 (f8.1).

exe.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜