Update tbe0 format
This commit is contained in:
parent
99209c344d
commit
34bba9b3f0
|
@ -299,13 +299,16 @@ LocaScoreMC <- function(lambda0, lambda1, NbSeq, tbe0, T){
|
||||||
xp = Score$X
|
xp = Score$X
|
||||||
P_X = Score$P_X
|
P_X = Score$P_X
|
||||||
|
|
||||||
NbSeqH0 = length(tbe0)
|
|
||||||
|
|
||||||
min_X = min(xp)
|
min_X = min(xp)
|
||||||
max_X = max(xp)
|
max_X = max(xp)
|
||||||
|
|
||||||
for (i in 1:NbSeq){
|
for (i in 1:NbSeq){
|
||||||
x = floor(E*log(dexp(tbe0[[i]], rate = lambda1)/dexp(tbe0[[i]], rate = lambda0)))
|
x = floor(E*log(dexp(tbe0[[i]], rate = lambda1)/dexp(tbe0[[i]], rate = lambda0)))
|
||||||
|
#print(range(x))
|
||||||
|
print(length(tbe0[[i]]))
|
||||||
|
if (min(x)==Inf){
|
||||||
|
print(tbe0[[i]])
|
||||||
|
}
|
||||||
X = c(X,x)
|
X = c(X,x)
|
||||||
LS = localScoreC(x)$localScore[1]
|
LS = localScoreC(x)$localScore[1]
|
||||||
|
|
||||||
|
@ -328,9 +331,13 @@ for (lambda0 in (1:5)){
|
||||||
if (lambda0 < lambda1){
|
if (lambda0 < lambda1){
|
||||||
cat("Nb = ", NbSeq, ", lambda0 = ", lambda0, ", lambda1 = ", lambda1, "\n", sep = "")
|
cat("Nb = ", NbSeq, ", lambda0 = ", lambda0, ", lambda1 = ", lambda1, "\n", sep = "")
|
||||||
|
|
||||||
ppH0 = PoissonProcess(lambda0,T)
|
tbe0=vector("list",length=NbSeq)
|
||||||
n1 = length(ppH0)
|
for (i in (1:NbSeq)) {
|
||||||
tbe0 = ppH0[2:n1]-ppH0[1:n1-1]
|
ppi = PoissonProcess(lambda0,T)
|
||||||
|
ni=length(ppi)
|
||||||
|
tbei=ppi[2:ni]-ppi[1:ni-1]
|
||||||
|
tbe0[[i]]=tbei
|
||||||
|
}
|
||||||
|
|
||||||
LS_H0 = LocaScoreMC(lambda0, lambda1, NbSeq, tbe0, T)
|
LS_H0 = LocaScoreMC(lambda0, lambda1, NbSeq, tbe0, T)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue