{"id":2128,"date":"2018-01-01T23:19:30","date_gmt":"2018-01-01T23:19:30","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=2128"},"modified":"2025-07-05T12:15:28","modified_gmt":"2025-07-05T11:15:28","slug":"cox-proportional-hazards","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/cox-proportional-hazards\/","title":{"rendered":"Cox Proportional Hazards"},"content":{"rendered":"\n<p>Cox proportional hazards is regression modelling on a survival object with one or more predictor variables. Central to the analysis is the baseline hazard function. The Cox model assumes that the hazard of a predictor is constant over time and stays proportionally the same in relation to other predictors.<\/p>\n\n\n\n<p>This example uses the veteran dataset that is part of the survival package<sup class='sup-ref-note' id='note-zotero-ref-p2128-r1-o1'><a class='sup-ref-note' href='#zotero-ref-p2128-r1'>1<\/a><\/sup>. In addition, the ggfortify package<sup class='sup-ref-note' id='note-zotero-ref-p2128-r2-o1'><a class='sup-ref-note' href='#zotero-ref-p2128-r2'>2<\/a><\/sup> is used to allow unified plotting in conjunction with the ggplot2 package<sup class='sup-ref-note' id='note-zotero-ref-p2128-r3-o1'><a class='sup-ref-note' href='#zotero-ref-p2128-r3'>3<\/a><\/sup>. The autoplot() function of ggfortify can be extended with ggplot2 calls (illustrated below).<\/p>\n\n\n\n<p>load the packages:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>library(ggfortify)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>library(survival)<\/em><\/span><\/code><\/pre>\n\n\n\n<p>Load the veteran data set of the survival package, that contains data from a two treatments randomised controlled trial in lung cancer:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>data(veteran)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>veteran<\/em><\/span>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#1609f0\" class=\"has-inline-color\">    trt  celltype time status karno\n1     1  squamous   72      1    60\n2     1  squamous  411      1    70\n3     1  squamous  228      1    60\n.....\n.....\n124   2     adeno   45      1    40\n125   2     adeno   80      1    40\n    diagtime age prior\n1          7  69     0\n2          5  64    10\n.....\n.....\n124        3  69     0\n125        4  63     0\n &#091; reached 'max' \/ getOption(\"max.print\") -- omitted 12 rows ]<\/mark><\/em>\n\n<span style=\"color: #ff0000;\"><em>str(veteran)<\/em><\/span>\n<span style=\"color: #0000ff;\"><em>'data.frame': 137 obs. of 8 variables:<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ trt : num 1 1 1 1 1 1 1 1 1 1 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ celltype: Factor w\/ 4 levels \"squamous\",\"smallcell\",..: 1 1 1 1 1 1 1 1 1 1 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ time : num 72 411 228 126 118 10 82 110 314 100 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ status : num 1 1 1 1 1 1 1 1 1 0 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ karno : num 60 70 60 60 70 20 40 80 50 70 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ diagtime: num 7 5 3 9 11 5 10 29 18 6 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ age : num 69 64 38 63 65 49 69 68 43 70 ...<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> $ prior : num 0 10 0 10 10 0 10 0 0 0 ...<\/em><\/span><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>trt (treatment): 1 = standard, 2 = test<\/li>\n\n\n\n<li>celltype: factor, 1 = squamous, 2 = small cell, 3 = adeno, 4 = large<\/li>\n\n\n\n<li>time: survival time in days<\/li>\n\n\n\n<li>status: censoring status<\/li>\n\n\n\n<li>karno: Karnofsky performance status<\/li>\n\n\n\n<li>diagtime: months from diagnosis to randomisation<\/li>\n\n\n\n<li>age: age in years<\/li>\n\n\n\n<li>prior: prior therapy: 0 = no, 10 = yes<\/li>\n<\/ul>\n\n\n\n<p><strong>Cox proportional hazards analysis<\/strong><\/p>\n\n\n\n<p>Fit a Cox regression model to the data:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>veteran_cox &lt;- coxph(Surv(time, status) ~ trt + celltype + karno + diagtime + age + prior, data = veteran)<\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>summary(veteran_cox)<\/em><\/span>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#3609f1\" class=\"has-inline-color\">Call:\ncoxph(formula = Surv(time, status) ~ trt + celltype + karno + \n    diagtime + age + prior, data = veteran)\n\n  n= 137, number of events= 128 \n\n                        coef  exp(coef)   se(coef)      z Pr(>|z|)    \ntrt                2.946e-01  1.343e+00  2.075e-01  1.419  0.15577    \ncelltypesmallcell  8.616e-01  2.367e+00  2.753e-01  3.130  0.00175 ** \ncelltypeadeno      1.196e+00  3.307e+00  3.009e-01  3.975 7.05e-05 ***\ncelltypelarge      4.013e-01  1.494e+00  2.827e-01  1.420  0.15574    \nkarno             -3.282e-02  9.677e-01  5.508e-03 -5.958 2.55e-09 ***\ndiagtime           8.132e-05  1.000e+00  9.136e-03  0.009  0.99290    \nage               -8.706e-03  9.913e-01  9.300e-03 -0.936  0.34920    \nprior              7.159e-03  1.007e+00  2.323e-02  0.308  0.75794    \n---\nSignif. codes:  0 \u2018***\u2019 0.001 \u2018**\u2019 0.01 \u2018*\u2019 0.05 \u2018.\u2019 0.1 \u2018 \u2019 1\n\n                  exp(coef) exp(-coef) lower .95 upper .95\ntrt                  1.3426     0.7448    0.8939    2.0166\ncelltypesmallcell    2.3669     0.4225    1.3799    4.0597\ncelltypeadeno        3.3071     0.3024    1.8336    5.9647\ncelltypelarge        1.4938     0.6695    0.8583    2.5996\nkarno                0.9677     1.0334    0.9573    0.9782\ndiagtime             1.0001     0.9999    0.9823    1.0182\nage                  0.9913     1.0087    0.9734    1.0096\nprior                1.0072     0.9929    0.9624    1.0541\n\nConcordance= 0.736  (se = 0.021 )\nLikelihood ratio test= 62.1  on 8 df,   p=2e-10\nWald test            = 62.37  on 8 df,   p=2e-10\nScore (logrank) test = 66.74  on 8 df,   p=2e-11<\/mark><\/em><\/code><\/pre>\n\n\n\n<p>The model shows that small cell tumours, adenocarcinomas and Karnofsky scores to be significant. However,\u00a0the result should be interpreted with caution as the Cox model assumes that the hazard of the predictors do not vary with time and this may\u00a0not be the case (ie Karnofsky score).<\/p>\n\n\n\n<p>Adenocarcinomas and Small cell tumours have a <strong>positive<\/strong> <strong>coefficient (higher hazard; hazard ratio 2.37 for small cell and 3.31 for adeno carcinomas)<\/strong>, suggesting a <strong>worse&nbsp;survival<\/strong> as compared to squamous carcinomas (the reference level). The Karnofsky score has a <strong>negative coefficient<\/strong>&nbsp;<strong>(lower hazard with higher scores and a harzard ratio of 0.97)<\/strong> (suggesting a&nbsp;better survival with higher Karnofsky scores).<\/p>\n\n\n\n<p>To show the Cox survival curve, combine ggfortify&#8217;s autoplot() function with ggplot() calls:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>veteran_cox_fit &lt;- survfit(veteran_cox)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>autoplot(veteran_cox_fit) + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>ggtitle(\"Cox Proportional Hazards - veteran data\") + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>xlab(\"Time &#091;days]\") + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>ylab(\"Survival Probability &#091;%]\")<\/em><\/span> <span style=\"color: #ff0000;\"><em>+<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>theme_bw() <\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"897\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran-1024x897.png\" alt=\"\" class=\"wp-image-3042\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran-1024x897.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran-300x263.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran-768x673.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran-1536x1345.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Cox_veteran.png 1916w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>However, this prediction curve is based on the mean value of the covariates (default). It is also possible to display the estimated survival depending on certain covariates. To do this, it is necessary to create a <strong>new data frame<\/strong>\u00a0that is passed to survfit. Unfortunately, ggfortify&#8217;s autoplot() function doesn&#8217;t plot the curves, but the survminer<sup class='sup-ref-note' id='note-zotero-ref-p2128-r4-o1'><a class='sup-ref-note' href='#zotero-ref-p2128-r4'>4<\/a><\/sup> package can produce them.<\/p>\n\n\n\n<p>For example, to create Cox proportional hazard curves for the different cell types, create a data frame (celltypes_df) with the values to be used. It is essential the variables have the <strong>same name<\/strong> and <strong>type<\/strong> (factor \/ numerical) as the data frame used for the modelling and that all variables are included. The above model has 6 predictor variables (trt, celltype, karno, diagtime, age and prior). Create a new data frame called celltypes_df:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>celltypes_df &lt;- with(veteran, data.frame(celltype = c(\"squamous\", \"smallcell\", \"adeno\", \"large\"), trt = rep(mean(trt), 4), karno = rep(mean(karno), 4), diagtime = rep(mean(diagtime), 4), age = rep(mean(age), 4), prior = rep(mean(prior), 4)))<\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>celltypes_df<\/em><\/span>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0507f8\" class=\"has-inline-color\">   celltype     trt    karno diagtime      age    prior\n1  squamous 1.49635 58.56934 8.773723 58.30657 2.919708\n2 smallcell 1.49635 58.56934 8.773723 58.30657 2.919708\n3     adeno 1.49635 58.56934 8.773723 58.30657 2.919708\n4     large 1.49635 58.56934 8.773723 58.30657 2.919708<\/mark><\/em><\/code><\/pre>\n\n\n\n<p>Check&nbsp;the structure (str()) of the data frame, to confirm the variables are of the correct type:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>str(celltypes_df)<\/em><\/span>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#3f08f9\" class=\"has-inline-color\">'data.frame':\t4 obs. of  6 variables:\n $ celltype: chr  \"squamous\" \"smallcell\" \"adeno\" \"large\"\n $ trt     : num  1.5 1.5 1.5 1.5\n $ karno   : num  58.6 58.6 58.6 58.6\n $ diagtime: num  8.77 8.77 8.77 8.77\n $ age     : num  58.3 58.3 58.3 58.3\n $ prior   : num  2.92 2.92 2.92 2.92<\/mark><\/em><\/code><\/pre>\n\n\n\n<p>Behind the scenes, R codes factors as integer numbers. The levels of the celltype variable in the original data frame (veteran) can be seen by:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>levels(veteran$celltype)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em><span style=\"color: #0000ff;\">&#091;1] \"squamous\" \"smallcell\" \"adeno\" \"large\"<\/span> <\/em><\/span><\/code><\/pre>\n\n\n\n<p>However, as shown in the structure of the celltypes_df data frame above, the celltype variable is now a character. To convert it to a factor and show the levels:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f50808\" class=\"has-inline-color\">celltypes_df$celltype &lt;- as.factor(celltypes_df$celltype)\nstr(celltypes_df)\n<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#1d07f5\" class=\"has-inline-color\">'data.frame':\t4 obs. of  6 variables:\n $ celltype: Factor w\/ 4 levels \"adeno\",\"large\",..: 4 3 1 2\n $ trt     : num  1.5 1.5 1.5 1.5\n $ karno   : num  58.6 58.6 58.6 58.6\n $ diagtime: num  8.77 8.77 8.77 8.77\n $ age     : num  58.3 58.3 58.3 58.3\n $ prior   : num  2.92 2.92 2.92 2.92<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f50808\" class=\"has-inline-color\">\nlevels(celltypes_df$celltype)\n<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#2d07f5\" class=\"has-inline-color\">&#091;1] \"adeno\"     \"large\"     \"smallcell\" \"squamous\" <\/mark><\/em><\/code><\/pre>\n\n\n\n<p>The levels have a different order (alphabetical),\u00a0but are otherwise the same.<\/p>\n\n\n\n<p>Now fit the new data to the model:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">celltypes_veteran_cox_fit &lt;- survfit(veteran_cox, newdata = celltypes_df)<\/span><\/em><\/code><\/pre>\n\n\n\n<p>Unfortunately, the autoplot() function doesn&#8217;t support the new data:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>autoplot(celltypes_veteran_cox_fit)<\/em><\/span>\n<span style=\"color: #0000ff;\"><em>Error in rbind(deparse.level, ...) : <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> numbers of columns of arguments do not match<\/em><\/span><\/code><\/pre>\n\n\n\n<p>But, the survminer package<sup class='sup-ref-note' id='note-zotero-ref-p2128-r5-o1'><a class='sup-ref-note' href='#zotero-ref-p2128-r5'>5<\/a><\/sup> does:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>library(survminer)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>ggsurvplot(celltypes_veteran_cox_fit, data=celltypes_df, conf.int = TRUE, <\/em><\/span><span style=\"color: #ff0000;\"><em>ggtheme = theme_bw())<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1015\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-1024x1015.png\" alt=\"\" class=\"wp-image-3052\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-1024x1015.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-300x297.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-150x150.png 150w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-768x761.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1-1536x1523.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata1.png 1598w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The plot shows the 4 strata as a number, but which one is which? Set the levels the same as the order of the factor levels in the original (veteran) data frame in the legend of the plot:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>ggsurvplot(celltypes_veteran_cox_fit, data=celltypes_df, conf.int = TRUE, ggtheme = theme_bw(), legend.labs = levels(veteran$celltype))<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"867\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2-1024x867.png\" alt=\"\" class=\"wp-image-3057\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2-1024x867.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2-300x254.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2-768x650.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2-1536x1300.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxstrata2.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As described in the model, compared to squamous cell carcinoma, small cell and adeno-carcinomas are significantly worse, but the confidence interval of large cell tumours overlaps.<\/p>\n\n\n\n<p>Similarly, define a custom dataframe:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>custom_df &lt;- with(veteran, data.frame(celltype = \"adeno\", trt = 1, karno = 50, diagtime = mean(diagtime), age = 80, prior = 0))<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>custom_df<\/em><\/span>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#1407f2\" class=\"has-inline-color\">  celltype trt karno diagtime age prior\n1    adeno   1    50 8.773723  80     0<\/mark><\/em>\n\n<span style=\"color: #ff0000;\"><em>custom_cox_fit &lt;- <em><span style=\"color: #ff0000;\">survfit(veteran_cox, newdata = custom_df)<\/span><\/em><\/em><\/span>\n<span style=\"color: #ff0000;\"><em>autoplot(custom_cox_fit) +<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>ggtitle(\"Cox Proportional Hazards - Custom Veteran Data\") + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>xlab(\"Time &#091;days]\") + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>ylab(\"Survival Probability &#091;%]\") + <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>theme_bw()<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"933\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1-1024x933.png\" alt=\"\" class=\"wp-image-3047\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1-1024x933.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1-300x273.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1-768x700.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1-1536x1400.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/Coxcustom1.png 1598w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Cox proportional hazards is regression modelling on a survival object with one or more predictor variables. Central to the analysis is the baseline hazard function. The Cox model assumes that the hazard of a predictor is constant over time and stays proportionally the same in relation to other predictors. This example uses the veteran dataset [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-2128","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=2128"}],"version-history":[{"count":1,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2128\/revisions"}],"predecessor-version":[{"id":4962,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2128\/revisions\/4962"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}