Hi Zheng,
You should modify your code to prevent it.
A hint :
try to test if the current sampled individual is different from the =
previous one or not : if yes modify it...
sample code follows :
temp.id<- sample(unique(tab$ID), replace=T) # c(1,2,3,4,6,5,6) =
#
temp.data<-NULL
while(length(temp.id)>0) {
if (temp.id[length(temp.id)]==temp.id[1]) =
temp.id[length(temp.id)]<- temp.id[length(temp.id)]+1000
temp.data<-rbind(temp.data,tab[tab$ID%in%temp.id,])
temp.id<-temp.id[duplicated(temp.id)]
}})
Cheers.
Samer
-----Original Message-----
From: owner-nmusers_at_globomaxnm.com on behalf of Zheng Lu
Sent: Thu 23/08/2007 11:50
To: nmusers_at_globomaxnm.com
Subject: [NMusers] S-plus code and data arrangement
Dear All:
When I apply sample()in S-plus to do for example, bootstrapping, let's
say we have four patients(patient ID is 1,2,3,4), one of the results
can be 4,4,4,4, how can I do to make NONMEM treat this result as four
patients, not just one patient. Do I need do something with data
arrangement or some other functions in S-plus can deal with this. Any
instructions will be highly appreciated.
Zheng
Received on Thu Aug 23 2007 - 14:20:19 EDT
This archive was generated by hypermail 2.2.0 : Tue Nov 06 2007 - 15:07:04 EST