Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 9f75b2a
  • /
  • math.input
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:b805a80a60b86ed676173735bf6a63d008e35953
directory badge
swh:1:dir:9f75b2a0b81b3df42aafc88986a69c92f0923bb6

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
math.input
-- Axiom/Fricas source file
-- Translate into .org?

-- general case
)cl p all
)pile
eta := operator 'eta
G := operator 'G
rule1 := rule (D(eta(t,beta),beta)==X; D(eta(t,beta),t)==XD*beta; D(eta(t,beta),[t,beta])==XD; eta(t,beta)==X*beta)
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
[D(expr,beta) for expr in [S,H,h]]
[rule1 expr for expr in [S,H,h]]
[rule1 D(expr,beta) for expr in [S,H,h]]

-- Proportional hazards
G(x) == exp(-exp(x))
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
D(G(x),x)
[rule1 expr for expr in [S,H,h]]
[rule1 D(expr,beta) for expr in [S,H,h]]

-- Proportional odds
G(x) == 1/(1+exp(x))
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
D(G(x),x)
[rule1 expr for expr in [S,H,h]]
[rule1 D(expr,beta) for expr in [S,H,h]]

-- Probit (is there a more canonical approach in Axiom?)
Phi := operator 'Phi
phi := operator 'phi
rule2 == rule D(Phi(x),x)==phi(x)
G(x) == Phi(-x)
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
rule2 D(G(x),x)
[rule1 rule2 expr for expr in [S,H,h]]
[rule1 rule2 D(expr,beta) for expr in [S,H,h]]

-- Additive hazards
G(x) == exp(-x)
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
D(G(x),x)
[rule1 expr for expr in [S,H,h]]
[rule1 D(expr,beta) for expr in [S,H,h]]

-- Aranda-Ordaz
G(x) == exp(-log(theta*exp(x)+1)/theta)
S := G(eta(t,beta))
H := -log(S)
h := D(H,t)
D(G(x),x)
[rule1 expr for expr in [S,H,h]]
[rule1 D(expr,beta) for expr in [S,H,h]]

-- Any other links?


-- Estimators
)cl p all

h := operator 'h
H := operator 'H
rule3 := rule (exp(logtheta)==theta; 1+theta*H(beta)==S0)

-- hazard
loghaz := log(h(beta))
rule3 D(loghaz,beta)

-- marginal hazard
marghaz := h(beta)/(1+exp(logtheta)*H(beta))
rule3 D(marghaz,beta)
rule3 D(marghaz,logtheta)
D(marghaz,beta) / (((1+exp(logtheta)*H(beta))*D(h(beta),beta)-exp(logtheta)*h(beta)*D(H(beta),beta))/(1+exp(logtheta)*H(beta))^2)
D(marghaz,logtheta) / (-exp(logtheta)*H(beta)*h(beta)/(1+exp(logtheta)*H(beta))^2)

logmarghaz := log(h(beta)/(1+exp(logtheta)*H(beta)))
rule3 D(logmarghaz,beta)
rule3 D(logmarghaz,logtheta)


-- marginal survival (identity link)
margS := (1+exp(logtheta)*H(beta))^(-exp(-logtheta)) -- identity transformation link
rule3 D(margS,beta)
rule3 D(margS,logtheta)
D(margS,beta) / (-(1+H(beta)*exp(logtheta))^(-exp(-logtheta)-1)*D(H(beta),beta))
eval(%,logtheta=1.5)
D(margS,beta) / (-margS*D(H(beta),beta)/(1+exp(logtheta)*H(beta)))
eval(%,[logtheta=1.5, H(beta)=2.0])
D(margS,logtheta) / (margS*(exp(-logtheta)*log(1+exp(logtheta)*H(beta))-H(beta)/(1+exp(logtheta)*H(beta))))
eval(%,[logtheta=1.5, H(beta)=2.0])

-- marginal survival (log-log link)
margS := log(-log((1+exp(logtheta)*H(beta))^(-exp(-logtheta))))
rule3 D(margS,beta)
rule3 D(margS,logtheta)



back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API