Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Sep 14, 2020
1 parent 1584877 commit d151534
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ end
@testset " # Validation with generated datasets " begin
using CSV
path = dirname(@__FILE__)
println("File path: " , path)
println("File rds12.csv ($(path*"/csv/rds12.csv")) exist: ", isfile(path*"/csv/rds12.csv"))
#println("File path: " , path)
#println("File rds12.csv ($(path*"/csv/rds12.csv")) exist: ", isfile(path*"/csv/rds12.csv"))
#1
#TRTR/RTRT
rds = ReplicateBE.randrbeds(;n=24, sequence=[1,1], design = ["T" "R" "T" "R"; "R" "T" "R" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], seed = 10001)
Expand Down Expand Up @@ -335,7 +335,7 @@ end
#12
#TRTR/RTRT
#SPSS DF 42.3382785451983
rds = CSV.file(path*"/csv/rds12.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds12.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "R" "T" "R"; "R" "T" "R" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10012)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 329.76454300481595 atol=1E-5
Expand All @@ -346,7 +346,7 @@ end
print(".")
#13
#TRRT/RTTR
rds = CSV.file(path*"/csv/rds13.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds13.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "R" "R" "T"; "R" "T" "T" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 100013)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 305.21958862123165 atol=1E-5
Expand All @@ -357,7 +357,7 @@ end
print(".")
#14
#TTRR/RRTT
rds = CSV.file(path*"/csv/rds14.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds14.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "T" "R" "R"; "R" "R" "T" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 100014)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 277.976236251267 atol=1E-5
Expand All @@ -368,7 +368,7 @@ end
print(".")
#15
#TRTR/RTRT/TRRT/RTTR
rds = CSV.file(path*"/csv/rds15.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds15.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2,3,4], design = ["T" "R" "T" "R"; "R" "T" "R" "T" ; "T" "R" "R" "T"; "R" "T" "T" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0, 0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10015)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 331.77741574 atol=1E-5
Expand All @@ -379,7 +379,7 @@ end
print(".")
#16
#TRRT/RTTR/TTRR/RRTT
rds = CSV.file(path*"/csv/rds16.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds16.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2,3,4], design = ["T" "R" "R" "T"; "R" "T" "T" "R" ; "T" "T" "R" "R"; "R" "R" "T" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0, 0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10016)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 285.69277340 atol=1E-5
Expand All @@ -390,7 +390,7 @@ end
print(".")
#17
#TRTR/RTRT/TTRR/RRTT
rds = CSV.file(path*"/csv/rds17.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds17.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2,3,4], design = ["T" "R" "T" "R"; "R" "T" "R" "T" ; "T" "T" "R" "R"; "R" "R" "T" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0, 0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10017)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 292.49505051 atol=1E-5
Expand All @@ -402,7 +402,7 @@ end
print(".")
#18
#TRT/RTR
rds = CSV.file(path*"/csv/rds18.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds18.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "R" "T"; "R" "T" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10018)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 237.09185442 atol=1E-5
Expand All @@ -414,7 +414,7 @@ end
print(".")
#19
#TRR/RTT
rds = CSV.file(path*"/csv/rds19.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds19.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "R" "R"; "R" "T" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10019)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 255.99536281 atol=1E-5
Expand All @@ -428,7 +428,7 @@ end
#SPSS REML 151.783195849874
#SPSS SE 0.214518365508227
#SPSS DF 10.0167597858775
rds = CSV.file(path*"/csv/rds20.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds20.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2,3,4], design = ["T" "R"; "R" "T"; "T" "T"; "R" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0, 0.0, 0.0], periodcoef = [0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10020)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
@test ReplicateBE.reml2(be) 151.78319585 atol=1E-5
Expand All @@ -440,7 +440,7 @@ end
print(".")
#21
#TRR/RTR/RRT
rds = CSV.file(path*"/csv/rds21.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds21.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2,3], design = ["T" "R" "R"; "R" "T" "R"; "R" "R" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10021)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
#SPSS REML 237.076723026247
Expand All @@ -459,7 +459,7 @@ end
print(".")
#22
#TRR/RTR
rds = CSV.file(path*"/csv/rds22.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds22.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=48, sequence=[1,2], design = ["T" "R" "R"; "R" "T" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 0.0], dropobs = 20, seed = 10022)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
#SPSS REML 234.103074
Expand All @@ -479,7 +479,7 @@ end
# Unbalanced by sequences
#23
#TRTR/RTRT
rds = CSV.file(path*"/csv/rds23.csv") |> DataFrame
rds = CSV.File(path*"/csv/rds23.csv") |> DataFrame
#rds = ReplicateBE.randrbeds(;n=36, sequence=[1,2], design = ["T" "R" "T" "R"; "R" "T" "R" "T"], inter=[0.5, 0.4, 0.1], intra=[0.1, 0.15], intercept = 1.0, seqcoef = [1.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0], seed = 10023)
be = ReplicateBE.rbe!(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
ci = confint(be, 0.1, expci = true)
Expand Down

0 comments on commit d151534

Please sign in to comment.