Skip to content

Commit

Permalink
Merge pull request #3 from rcqls/main
Browse files Browse the repository at this point in the history
Update VAM to VirtualAgeModels
  • Loading branch information
rcqls authored Jun 26, 2023
2 parents 0fb9b58 + 580bc40 commit d4c4a3c
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 41 deletions.
54 changes: 27 additions & 27 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.9.0"
julia_version = "1.9.1"
manifest_format = "2.0"
project_hash = "360fa5c287212c41321ca17e534c448f3f688a14"
project_hash = "d74d8905f2c948a04e769adc098911ffce34eaa3"

[[deps.Adapt]]
deps = ["LinearAlgebra", "Requires"]
Expand All @@ -22,9 +22,9 @@ version = "1.1.1"

[[deps.ArrayInterface]]
deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"]
git-tree-sha1 = "d3f758863a47ceef2248d136657cb9c033603641"
git-tree-sha1 = "f83ec24f76d4c8f525099b2ac475fc098138ec31"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "7.4.8"
version = "7.4.11"

[deps.ArrayInterface.extensions]
ArrayInterfaceBandedMatricesExt = "BandedMatrices"
Expand Down Expand Up @@ -62,9 +62,9 @@ version = "0.3.0"

[[deps.Compat]]
deps = ["UUIDs"]
git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957"
git-tree-sha1 = "4e88377ae7ebeaf29a047aa1ee40826e0b708a5d"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.6.1"
version = "4.7.0"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
Expand Down Expand Up @@ -128,19 +128,19 @@ version = "1.1.0"

[[deps.DiffRules]]
deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "158232a81d43d108837639d3fd4c66cc3988c255"
git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.14.0"
version = "1.15.1"

[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[deps.Distributions]]
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "c72970914c8a21b36bbc244e9df0ed1834a0360b"
git-tree-sha1 = "db40d3aff76ea6a3619fdd15a8c78299221a2394"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.25.95"
version = "0.25.97"

[deps.Distributions.extensions]
DistributionsChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -172,9 +172,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[deps.FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "ed569cb9e7e3590d5ba884da7edc50216aac5811"
git-tree-sha1 = "0b3b52afd0f87b0a3f5ada0466352d125c9db458"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "1.1.0"
version = "1.2.1"

[[deps.FiniteDiff]]
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"]
Expand Down Expand Up @@ -216,9 +216,9 @@ uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"

[[deps.HypergeometricFunctions]]
deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"]
git-tree-sha1 = "84204eae2dd237500835990bcade263e27674a93"
git-tree-sha1 = "0ec02c648befc2f94156eaef13b0f38106212f3f"
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
version = "0.3.16"
version = "0.3.17"

[[deps.InlineStrings]]
deps = ["Parsers"]
Expand Down Expand Up @@ -366,9 +366,9 @@ version = "0.5.5+0"

[[deps.Optim]]
deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"]
git-tree-sha1 = "a89b11f0f354f06099e4001c151dffad7ebab015"
git-tree-sha1 = "e3a6546c1577bfd701771b477b794a52949e7594"
uuid = "429524aa-4258-5aef-a3af-852621145aeb"
version = "1.7.5"
version = "1.7.6"

[[deps.OrderedCollections]]
git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282"
Expand All @@ -389,9 +389,9 @@ version = "0.12.3"

[[deps.Parsers]]
deps = ["Dates", "PrecompileTools", "UUIDs"]
git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c"
git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.5.10"
version = "2.7.1"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
Expand All @@ -412,9 +412,9 @@ version = "0.2.4"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "259e206946c293698122f63e2b513a7c99a244e8"
git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.1.1"
version = "1.1.2"

[[deps.Preferences]]
deps = ["TOML"]
Expand Down Expand Up @@ -499,19 +499,19 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00"
git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.1.0"
version = "1.1.1"

[[deps.SparseArrays]]
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.SpecialFunctions]]
deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"]
git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880"
git-tree-sha1 = "7beb031cf8145577fbccacd94b8a8f4ce78428d3"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "2.2.0"
version = "2.3.0"

[deps.SpecialFunctions.extensions]
SpecialFunctionsChainRulesCoreExt = "ChainRulesCore"
Expand All @@ -537,9 +537,9 @@ version = "1.6.0"

[[deps.StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916"
git-tree-sha1 = "75ebe04c5bed70b91614d684259b661c9e6274a4"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.21"
version = "0.34.0"

[[deps.StatsFuns]]
deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
Expand Down Expand Up @@ -615,7 +615,7 @@ version = "1.2.13+0"
[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.7.0+0"
version = "5.8.0+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
7 changes: 5 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name = "VAM"
name = "VirtualAgeModels"
uuid = "b276bca3-8be3-40c5-b17b-0eb635c89c3b"
authors = ["R cqls <[email protected]>"]
authors = ["Rcqls <[email protected]>"]
version = "0.1.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
julia = "1.9"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## Moving VAM to julia
## VirtualAgeModels Moving VAM to julia
2 changes: 1 addition & 1 deletion examples/vam_bayesian.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels

m = @vam(Temps & Type ~ (ARA1(.4) | Weibull(0.01,2.5)))
df = rand(m, @stop (size < 30))
Expand Down
6 changes: 3 additions & 3 deletions examples/vam_covariates.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels
using DataFrames
using Distributions
using RCall
Expand Down Expand Up @@ -37,8 +37,8 @@ mbis = @vam(System & Time & Type ~ (ARAInf(0.8)|Weibull(0.15,2.3|0.6cov1 + -0.9c
ml = mle(mbis,dataDF,dataCov;method=NelderMead())
mlbis = mle(mbis,dataDF,dataCov)

VAM.params(ml.mle)
sum(VAM.params(ml.mle) .- cres)
params(ml.mle)
sum(params(ml.mle) .- cres)
contrast(ml.mle)

m2 = @vam( time & type ~ (ARAInf(0.4) | Weibull(0.001,1.5)) )
Expand Down
4 changes: 2 additions & 2 deletions examples/vam_mle_amc_amb.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels
using DataFrames
#using RData
using RCall
Expand All @@ -15,5 +15,5 @@ res <- coef(AMC_mle)

m = @vam(Time & Type ~ (ARA∞(0.6) | Weibull(1.0,3.0)))
mle(m, AMC_Amb)
VAM.params(m)
params(m)
sum(abs.(res .- params(m)))
2 changes: 1 addition & 1 deletion examples/vam_mle_contrast.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels
using DataFrames

data = DataFrame(time=[3.36],type=[-1])
Expand Down
2 changes: 1 addition & 1 deletion examples/vam_model.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels
using Distributions

vam = @vam(time & type ~ (ARAInf(0.4) | Weibull(0.001,2.5)))
Expand Down
2 changes: 1 addition & 1 deletion examples/vam_sim.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VAM
using VirtualAgeModels
using DataFrames

s = simulator(
Expand Down
2 changes: 1 addition & 1 deletion src/VAM.jl → src/VirtualAgeModels.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module VAM
module VirtualAgeModels

using Random, DataFrames, Optim, Distributions
export @vam, @stop, params, params!, nbparams, data, data!, simulator, sim, simulate, mle, bayesian
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Test
using VAM
using VirtualAgeModels
using DataFrames
using RCall

Expand Down
7 changes: 7 additions & 0 deletions test/test/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.9.1"
manifest_format = "2.0"
project_hash = "da39a3ee5e6b4b0d3255bfef95601890afd80709"

[deps]
1 change: 1 addition & 0 deletions test/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[deps]

0 comments on commit d4c4a3c

Please sign in to comment.