Understanding Relative Risk – with T-SQL

In this post we will explore a common statistical term – Relative Risk, otherwise called Risk Factor. Relative Risk is a term that is important to understand when you are doing comparative studies of two groups that are different in some specific way. The most common usage of this is in drug testing – with one group that has been exposed to medication and one group that has not. Or , in comparison of two different medications with two groups with each exposed to a different one.
To understand better am going to use the same example that I briefly referenced in my earlier post.

a1

In this case the risk of a patient treated with Drug A developing asthma is 56/100 = 0.56. Risk of patient treated with drug B developing asthma is 32/100 = 0.32. So the relative risk is 0.56/0.32 which is 1.75. Absolute Risk, is another term which is the difference in probabilities of the two cases(0.56-0.32). There are some posts that argue that absolute risk should be used while comparing two medications and relative risk for one medication versus none at all but this is not a hard rule and there are many variations.

This wikipedia post has a great summary of relative risk – make sure to read the link they have on absolute risk also.

Now, applying relative risk to the problem we were trying to solve in the earlier post – we have two groups of data as below.

a3

The relative risk in the first case is (32/40)/(24/60) = 2. In the second group it is (24/60)/(8/40) = 2. So logically when we combine(add) the two groups we should still get a relative risk of 2. But we get 1.75, as we saw with the first set of data above. The reason for that skew is because of the age factor, also called the confounding variable. We used the cochran-mantel test to mitigate the effect of the age factor to calculate x2 and pi value for the same data. We can use the same test to calculate relative risk by obscuring the age factor – the formula for doing this is as below (with due thanks to the text book on Introductory Applied Biostatistics.
relativerisk

Using the formula on the data in T-SQL (you can find the dataset to use here) –

declare @Batch2DrugAYes numeric(18,2), @Batch2DrugANo numeric(18,2), @Batch2DrugBYes numeric(18, 2), @Batch2DrugBNo numeric(18, 2)
declare @riskratio numeric(18, 2), @riskrationumerator numeric(18, 2), @riskratiodenom numeric(18,2 )
declare @totalcount numeric(18, 2)

SELECT @totalcount = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1
SELECT @Batch1DrugAYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'A' AND response = 'Y'
SELECT @Batch1DrugANo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'A' AND response = 'N'
SELECT @Batch1DrugBYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'B' AND response = 'Y'
SELECT @Batch1DrugBNo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'B' AND response = 'N'

SELECT @Batch2DrugAYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'A' AND response = 'Y'
SELECT @Batch2DrugANo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'A' AND response = 'N'
SELECT @Batch2DrugBYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'B' AND response = 'Y'
SELECT @Batch2DrugBNo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'B' AND response = 'N'

SELECT @riskrationumerator = (@Batch1DrugAYes*(@Batch1DrugBYes+@Batch1DrugBNo))/@totalcount
SELECT @riskrationumerator = @riskrationumerator + (@Batch2DrugAYes*(@Batch2DrugBYes+@Batch2DrugBNo))/@totalcount

SELECT @riskratiodenom = (@Batch1DrugBYes*(@Batch1DrugAYes+@Batch1DrugANo))/@totalcount
SELECT @riskratiodenom = @riskratiodenom + (@Batch2DrugBYes*(@Batch2DrugAYes+@Batch2DrugANo))/@totalcount
--SELECT @riskratiodenom
--SELECT @riskrationumerator,@riskratiodenom
SELECT 'Adjust Risk Ratio: ', @riskrationumerator/@riskratiodenom

riskratio

We can write code in R to achieve above result – there is no in built function to do this as far as I can see. But when we can write simpler code in T-SQL I was not sure if it worth the trouble to do it for this particular case. We have at least one scenario we can do something easily in T-SQL that R does not seem to have built-in. I certainly enjoyed that feeling!! Thanks for reading.

 

Cochran-Mantel-Haenzel Method with T-SQL and R – Part I

This test is an extension of the Chi Square test I blogged of earlier. This is applied when we have to compare two groups over several levels and comparison may involve a third variable.
Let us consider a cohort study as an example – we have two medications A and B to treat asthma. We test them on a randomly selected batch of 200 people. Half of them receive drug A and half of them receive drug B. Some of them in either half develop asthma and some have it under control. The data set I have used can be found here. The summarized results are as below.
a1

To understand this data better, let us look at a very important statistical term – Relative Risk .It is the ratio of two probabilities.That is, the Risk of patient developing asthma with Medication A/Risk of patient developing asthma with medication B. In this case the risk of a patient treated with Drug A developing asthma is 56/100 = 0.56. Risk of patient treated with drug B developing asthma is 32/100 = 0.32. So the relative risk is 0.56/0.32 which is 1.75.

Let us assume a theory/hypothesis then, that there is no significant difference in developing asthma from taking drug A versus taking drug B. Or in other words, that comparative relative risk from the two medications is the same, or that their ratio is 1. We can test this hypothesis using Chi Square test in R. (If you want the long winded T-SQL way of doing the Chi Square test refer to my blog post here. The goal of this post is to go further than that so am not repeating this using T-SQL, just using R for this step).

mymatrix3 <- matrix(c(56,44,32,68),nrow=2,byrow=TRUE)
colnames(mymatrix3) <- c("Yes","No")
rownames(mymatrix3) <- c("A", "B")
chisq.test(mymatrix3)

a2

Since the p value is significantly less than 0.05, we can conclude with 95% certainty that the null hypothesis is false and the two medications have different effects, not the same.

Now, let us take it one step further. Inspection of the data reveals that people selected randomly for the test fall broadly into two age groups, below 65 and over or equal to 65. Let us call these two age groups 1 and 2. If we separate the data into these two groups it looks like this.

a3

Running the chi square test on both of these datasets, we get results like this :

mymatrix1 <- matrix(c(32,8,24,36),nrow=2,byrow=TRUE)
colnames(mymatrix1) <- c("Yes","No")
rownames(mymatrix1) <- c("A","B")
chisq.test(mymatrix1)

mymatrix2 <- matrix(c(24,36,8,32),nrow=2,byrow=TRUE)
colnames(mymatrix2) <- c("Yes","No")
rownames(mymatrix2) <- c("A", "B")
myarray <- array(c(mymatrix1,mymatrix2),dim=c(2,2,2))
chisq.test(mymatrix2)

a3

In the second dataset for people of age group < 65, we can see that the p value is greater than 0.05 thus proving the null hypothesis right. In other words, when the data is split into two groups based on age, the original assumption does not hold true. Age, in this case, becomes the confounding variable or the variable that changes the conclusions we draw from the dataset. The chi square test shows results that take into account the age variable. These results are not wrong but do not tell us if the two datasets are related for -specifically- for the the two variables we are looking for – drug used and nature of response.
To test for the independence of two variables and mute the effect of the confounding variable with repeated measurements, the Cochran-Mantel-Haenszel test can be used. If you  have a matrix as below , the formula for x-squared/pi value for this test is

The above image is used with thanks from the book Introductory Applied Biostatistics.

Using T-SQL: I used the same formula as the textbook, only added the correction of 0.5 to the numerator, since R uses the correction automatically and we want to compare results to R.(Disclaimer: To be aware that I have intentionally done this step-by-step for the sake of clarity, and not tried to optimize T-SQL by doing it shortest way for this. It is my humble opinion that these calculations are best done using R – T-SQL is a backup method and a good means to understand what goes behind the formula, nothing more.)

declare @Batch1DrugAYes numeric(18,2), @Batch1DrugANo numeric(18,2), @Batch1DrugBYes numeric(18, 2), @Batch1DrugBNo numeric(18, 2)
declare @Batch2DrugAYes numeric(18,2), @Batch2DrugANo numeric(18,2), @Batch2DrugBYes numeric(18, 2), @Batch2DrugBNo numeric(18, 2)
declare @xsquared numeric(18, 2), @xsquarednumerator numeric(18, 2), @xsquareddenom numeric(18,2 )
declare @totalcount numeric(18, 2)

SELECT @totalcount = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1
SELECT @Batch1DrugAYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'A' AND response = 'Y'
SELECT @Batch1DrugANo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'A' AND response = 'N'
SELECT @Batch1DrugBYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'B' AND response = 'Y'
SELECT @Batch1DrugBNo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 1 AND drug = 'B' AND response = 'N'

SELECT @Batch2DrugAYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'A' AND response = 'Y'
SELECT @Batch2DrugANo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'A' AND response = 'N'
SELECT @Batch2DrugBYes = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'B' AND response = 'Y'
SELECT @Batch2DrugBNo = count(*) FROM [dbo].[DrugResponse] WHERE batch = 2 AND drug = 'B' AND response = 'N'

SELECT @xsquarednumerator = ((@Batch1DrugAYes*@Batch1DrugBNo) - (@Batch1DrugANo*@Batch1DrugBYes))/100
SELECT @xsquarednumerator = @xsquarednumerator + ((@Batch2DrugAYes*@Batch2DrugBNo) - (@Batch2DrugANo*@Batch2DrugBYes))/100
SELECT @xsquarednumerator = SQUARE(@xsquarednumerator-0.5)

SELECT @xsquareddenom = ((@Batch1DrugAYes+@Batch1DrugANo)*(@Batch1DrugBYes+@Batch1DrugBNo)*(@Batch1DrugAYes+@Batch1DrugBYes)*(@Batch1DrugANo+@Batch1DrugBNo))/(SQUARE(@TOTALCOUNT)*(@totalcount-1))
SELECT @xsquareddenom = @xsquareddenom + ((@Batch2DrugAYes+@Batch2DrugANo)*(@Batch2DrugBYes+@Batch2DrugBNo)*(@Batch2DrugAYes+@Batch2DrugBYes)*(@Batch2DrugANo+@Batch2DrugBNo))/(SQUARE(@TOTALCOUNT)*(@totalcount-1))
--SELECT @xsquareddenom
--SELECT @xsquarednumerator,@xsquareddenom
SELECT 'Chi Squared: ', @xsquarednumerator/@xsquareddenom


c1

We get a chi square value of 17.17. With T-SQL it is hard to take it further than that, so we have to stick this value into a calculator to get the corresponding p-value. The P-Value is 3.5E-05. The result is significant at p < 0.05. What this means in lay man terms is that the two datasets have differences that are statistically significant in nature and that the null hypothesis that says they are the same statistically is false.

Trying to do the same thing in R is very easy –

mymatrix1 <- matrix(c(32,8,24,36),nrow=2,byrow=TRUE)
colnames(mymatrix1) <- c("Yes","No")
rownames(mymatrix1) <- c("A","B")
 
mymatrix2 <- matrix(c(24,36,8,32),nrow=2,byrow=TRUE)
colnames(mymatrix2) <- c("Yes","No")
rownames(mymatrix2) <- c("A", "B")
myarray <- array(c(mymatrix1,mymatrix2),dim=c(2,2,2))
mantelhaen.test(myarray)

Results are as below and almost identical to what we found with T-SQL. Hence the conclusion drawn is valid, that the two datasets are different regardless of age.

 

m1

In the next post I will cover the calculation of relative risk with this method. Thank you for reading.

Dataset for Cochran-Mantel-Hanzel Test

Below is the script to create the table and dataset I used. This is just test data and not copied from anywhere.

USE [yourdb]
GO
/****** Object: Table [dbo].[DrugResponse] Script Date: 6/12/2017 6:45:46 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIERl ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DrugResponse](
 [seqno] [int] IDENTITY(1,1) NOT NULL,
 [Batch] [smallint] NOT NULL,
 [Drug] [char](1) NOT NULL,
 [Response] [char](1) NOT NULL,
 CONSTRAINT [PK_DrugResponse] PRIMARY KEY CLUSTERED 
(
 [seqno] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[DrugResponse] ON

GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (1, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (2, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (3, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (4, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (5, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (6, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (7, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (8, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (9, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (10, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (11, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (12, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (13, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (14, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (15, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (16, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (17, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (18, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (19, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (20, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (21, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (22, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (23, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (24, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (25, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (26, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (27, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (28, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (29, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (30, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (31, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (32, 1, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (33, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (34, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (35, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (36, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (37, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (38, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (39, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (40, 1, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (41, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (42, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (43, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (44, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (45, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (46, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (47, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (48, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (49, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (50, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (51, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (52, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (53, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (54, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (55, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (56, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (57, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (58, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (59, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (60, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (61, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (62, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (63, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (64, 1, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (65, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (66, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (67, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (68, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (69, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (70, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (71, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (72, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (73, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (74, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (75, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (76, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (77, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (78, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (79, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (80, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (81, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (82, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (83, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (84, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (85, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (86, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (87, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (88, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (89, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (90, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (91, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (92, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (93, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (94, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (95, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (96, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (97, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (98, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (99, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (100, 1, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (101, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (102, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (103, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (104, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (105, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (106, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (107, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (108, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (109, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (110, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (111, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (112, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (113, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (114, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (115, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (116, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (117, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (118, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (119, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (120, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (121, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (122, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (123, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (124, 2, N'A', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (125, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (126, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (127, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (128, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (129, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (130, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (131, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (132, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (133, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (134, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (135, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (136, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (137, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (138, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (139, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (140, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (141, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (142, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (143, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (144, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (145, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (146, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (147, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (148, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (149, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (150, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (151, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (152, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (153, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (154, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (155, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (156, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (157, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (158, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (159, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (160, 2, N'A', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (161, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (162, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (163, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (164, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (165, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (166, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (167, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (168, 2, N'B', N'Y')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (169, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (170, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (171, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (172, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (173, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (174, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (175, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (176, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (177, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (178, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (179, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (180, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (181, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (182, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (183, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (184, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (185, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (186, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (187, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (188, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (189, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (190, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (191, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (192, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (193, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (194, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (195, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (196, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (197, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (198, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (199, 2, N'B', N'N')
GO
INSERT [dbo].[DrugResponse] ([seqno], [Batch], [Drug], [Response]) VALUES (200, 2, N'B', N'N')
GO
SET IDENTITY_INSERT [dbo].[DrugResponse] OFF
GO