# How to integrate this function into Shiny?

...
I just recently started to learn `Shiny`.

Overview of this question: (1) How it works in R incl. script, (2) How it should work in Shiny and framing the question, (3) Data

Question: where to write the `Shiny` `input\$ID` in this `function` to make it calculate the `nomogram`/`nom`-score based on the `UI`-inputs?

(1) How it works in R incl. script

I am performing `survival-analysis`, and I have produced a rather simple `nomogram` using the `rms`-package. The `nomogram` can be found below and is stored in `nom`.

You can see how the `nomogram` currently looks in `plot(nom)`

The `nomogram` is based on some input covariates from my datasheet `p` ( which too is attached below [just as a sample]).

``````> head(p)
alder    sex contra.pos ecs n.fjernet n.sygdom os.neck mors
1    47   Male      Ipsi.  No        22        1    9.63    0
2    50   Male      Ipsi.  No        61        2    7.03    0
3    61 Female      Ipsi.  No        50        1    9.17    0
4    83 Female      Ipsi. Yes        47        3   10.48    0
5    38 Female      Ipsi.  No        30        1    7.69    1
6    44 Female      Ipsi.  No        60        0   15.18    0
``````

I have a `function` in `r`, that calculates the `nomogram`-score for each patient based on their individual covariates

``````# Where to write the Shiny input\$ID in this function to make it work with the user online?

p <- p %>% mutate(score = as.numeric(apply(p, 1, function(x)
nom\$ecs\$points[nom\$ecs\$ecs==x['ecs']] +
nom\$contra.pos\$points[nom\$contra.pos\$contra.pos==x['contra.pos']] +
nom\$n.fjernet\$points[nom\$n.fjernet\$n.fjernet==as.numeric(x['n.fjernet'])] +
nom\$n.sygdom\$points[nom\$n.sygdom\$n.sygdom==as.numeric(x['n.sygdom'])])),
score.group = as.factor(ifelse(score<35.9,1,
ifelse(score>=35.9 & score<55.2,2,
ifelse(score>=55.2 & score<70.0,3,
ifelse(score>=70.0 & score<83.3,4,
ifelse(score>=83.3,5,"missing")))))))
``````

So that now

``````> head(p)
alder    sex contra.pos ecs n.fjernet n.sygdom os.neck mors    score score.group
1    47   Male      Ipsi.  No        22        1    9.63    0 41.08139           2
2    50   Male      Ipsi.  No        61        2    7.03    0 44.89913           2
3    61 Female      Ipsi.  No        50        1    9.17    0 35.13064           1
4    83 Female      Ipsi. Yes        47        3   10.48    0 70.63441           4
5    38 Female      Ipsi.  No        30        1    7.69    1 39.38118           2
6    44 Female      Ipsi.  No        60        0   15.18    0 21.04481           1
``````

(2) How it should work in Shiny

The idea is that the online user may choose their own inputs of `p\$n.fjernet`, `p\$n.sygdom`, `p\$ecs` and `p\$contra.pos` such as demonstrated below.

Written with

``````ui <- fluidPage(
sliderInput("n.fjernet", "Lymph Nodal Yield", min = 2, max = 150, value = 30),
sliderInput("n.sygdom", "Number of positive lymph nodes", min = 0, max = 40, value = 0),

)
``````

Based on the `input\$n.fjernet`, `input\$n.sygdom`, `input\$ecs` and `input\$contra.pos`, I would like the above written function to estimate a `Nomogram score` in the `Shiny`-output similar to the `p\$score`.

Something like (added manually in photoshop):

Please, how can I apply the above written `function` to do this in `Shiny`?

(3) Data

My data `p`

``````p <- structure(list(alder = c(47, 50, 61, 83, 38, 44, 45, 47, 52,
54, 56, 58, 58, 59, 63, 65, 65, 67, 71, 71, 73, 73, 77, 88, 89,
35, 35, 41, 47, 48, 49, 51, 51, 53, 55, 59, 60, 65, 67, 68, 68,
70, 74, 84, 27, 48, 49, 50, 55, 56, 57, 58, 58, 60, 62, 62, 63,
63, 64, 64, 66, 70, 71, 72, 75, 76, 80, 83, 84, 44, 46, 51, 58,
59, 60, 61, 63, 63, 66, 66, 67, 69, 70, 79, 80, 82, 84, 51, 53,
53, 54, 54, 54, 57, 58, 59, 60, 61, 61, 62, 62, 67, 71, 72, 72,
73, 75, 77, 80, 85, 38, 46, 49, 49, 51, 52, 54, 54, 55, 55, 58,
59, 61, 62, 63, 64, 66, 66, 66, 67, 70, 71, 73, 73, 81, 34, 41,
46, 47, 51, 54, 54, 55, 57, 57, 58, 58, 60, 61, 64, 75, 77, 78,
79, 80, 83, 86, 36, 38, 42, 47, 49, 49, 49, 52, 53, 55, 55, 55,
60, 62, 63, 63, 64, 64, 65, 67, 67, 68, 69, 71, 71, 80, 80, 38,
39, 47, 51, 53, 53, 58, 58, 66, 67, 69, 70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 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 2L,
2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L,
2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L,
1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L,
1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L), .Label = c("No",
"Yes"), class = "factor"), n.fjernet = c(22L, 61L, 50L, 47L,
30L, 60L, 82L, 60L, 33L, 67L, 35L, 56L, 15L, 37L, 44L, 124L,
41L, 30L, 31L, 35L, 36L, 28L, 39L, 54L, 25L, 27L, 69L, 53L,
24L, 33L, 52L, 77L, 51L, 7L, 22L, 53L, 26L, 58L, 28L, 83L,
39L, 15L, 37L, 27L, 9L, 17L, 32L, 26L, 44L, 52L, 22L, 62L,
53L, 68L, 52L, 38L, 50L, 21L, 41L, 74L, 15L, 26L, 36L, 37L,
34L, 22L, 31L, 53L, 13L, 44L, 43L, 51L, 20L, 21L, 63L, 40L,
25L, 17L, 43L, 47L, 35L, 21L, 4L, 23L, 35L, 50L, 69L, 24L,
38L, 45L, 37L, 35L, 25L, 19L, 43L, 19L, 33L, 38L, 50L, 21L,
40L, 100L, 45L, 53L, 41L, 7L, 75L, 48L, 20L, 11L, 72L, 37L,
34L, 70L, 20L, 47L, 44L, 45L, 48L, 23L, 27L, 24L, 39L, 9L,
34L, 22L, 89L, 40L, 35L, 34L, 61L, 28L, 27L, 62L, 47L, 13L,
20L, 9L, 27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L, 1L, 2L, 0L, 1L,
1L, 0L, 0L), os.neck = c(9.63, 7.03, 9.17, 10.48, 7.69, 15.18,
13.5, 16.33, 15.31, 12.09, 12.35, 22.28, 15.77, 14.39, 10.02,
14.52, 8.44, 23.82, 5.95, 3.78, 19.32, 20.14, 15.51, 19.78,
12.98, 32.92, 9.76, 5.65, 30.75, 2.79, 33.58, 27.53, 27.63,
14.62, 29.17, 25.4, 18.43, 5.29, 30.75, 28.48, 14.69, 13.14,
6.6, 26.81, 40.74, 11.63, 13.31, 10.41, 9.56, 17.51, 35.78,
35.75, 37.62, 33.25, 36.96, 34.56, 40.05, 41.26, 24.34, 37.49,
40.94, 24.11, 39.33, 11.24, 39.1, 19.75, 38.93, 39.36, 36.34,
48, 29.17, 47.93, 3.68, 24.21, 46.36, 49.12, 50.96, 14.16,
54.01, 19.88, 50.86, 1.87, 54.24, 13.93, 11.6, 10.05, 23.1,
62.78, 12.58, 39, 59.83, 6.77, 60.39, 18.46, 61.77, 58.41,
49.45, 64.26, 2.4, 26.51, 58.94, 69.91, 64.66, 55.56, 46.55,
29.63, 55.66, 19.68, 7.62, 2.73, 17.77, 10.12, 9.95, 74.22,
57.3, 58.94, 27.01, 34.23, 78.82, 27.2, 83.02, 76.68, 58.15,
22.18, 14.49, 3.91, 25.92, 74.64, 66.83, 70.74, 38.08, 7.69,
74.55, 49.94, 11.1, 88.54, 6.44, 79.54, 80.82, 70.83, 12.91,
81.25, 17.38, 29.96, 94.72, 73.53, 72.54, 1.35, 89.69, 62.85,
7.62, 93.27, 5.09, 51.25, 62, 55.33, 44.62, 56.94, 94.55,
88.61, 32.46, 11.04, 16.53, 100.04, 24.74, 24.54, 5.75, 59.83,
59.83, 77.77, 92.78, 49.58, 91.2, 1.18, 18.92, 6.34, 32.46,
72.41, 105.82, 1.84, 12.78, 57.56, 59.14, 104.08, 15.54,
117.75, 4.27, 67.61, 19.78, 112.49, 53.59, 107.01, 47.57,
9.46, 53.59, 46.46, 57.33, 18.76, 82.04, 13.67), mors = c(0L,
0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L,
1L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L,
0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 1L,
0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L,
0L, 0L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 0L,
1L, 0L, 1L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 0L,
0L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 1L, 0L,
0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 1L,
0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 1L,
0L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 0L, 1L, 0L,
1L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 1L, 1L, 1L, 0L,
0L, 0L, 1L, 0L)), na.action = structure(c(`987` = 987L, `1020` = 1020L,
`1035` = 1035L, `1102` = 1102L, `1251` = 1251L, `1253` = 1253L,
`1302` = 1302L), class = "omit"), row.names = c(NA, 200L), class = "data.frame")
``````

And the `nomogram` stored in `nom`

``````# plot(nom) for nomogram

nom <- structure(list(n.fjernet = structure(list(n.fjernet = c(2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
127, 128, 129, 130, 131, 132, 133), Xbeta = c(`1` = -0.0114560716414661,
`2` = -0.0171841074621991, `3` = -0.0229121432829322, `4` = -0.0286401791036652,
`5` = -0.0343682149243983, `6` = -0.0400962507451313, `7` = -0.0458242865658644,
`8` = -0.0515523223865974, `9` = -0.0572803582073305, `10` = -0.0630083940280635,
`11` = -0.0687364298487966, `12` = -0.0744644656695296, `13` = -0.0801925014902627,
`14` = -0.0859205373109957, `15` = -0.0916485731317288, `16` = -0.0973766089524618,
`17` = -0.103104644773195, `18` = -0.108832680593928, `19` = -0.114560716414661,
`20` = -0.120288752235394, `21` = -0.126016788056127, `22` = -0.13174482387686,
`23` = -0.137472859697593, `24` = -0.143200895518326, `25` = -0.148928931339059,
`26` = -0.154656967159792, `27` = -0.160385002980525, `28` = -0.166113038801258,
`29` = -0.171841074621991, `30` = -0.177569110442725, `31` = -0.183297146263458,
`32` = -0.189025182084191, `33` = -0.194753217904924, `34` = -0.200481253725657,
`35` = -0.20620928954639, `36` = -0.211937325367123, `37` = -0.217665361187856,
`38` = -0.223393397008589, `39` = -0.229121432829322, `40` = -0.234849468650055,
`41` = -0.240577504470788, `42` = -0.246305540291521, `43` = -0.252033576112254,
`44` = -0.257761611932987, `45` = -0.26348964775372, `46` = -0.269217683574453,
`47` = -0.274945719395186, `48` = -0.280673755215919, `49` = -0.286401791036652,
`50` = -0.292129826857386, `51` = -0.297857862678119, `52` = -0.303585898498852,
`53` = -0.309313934319585, `54` = -0.315041970140318, `55` = -0.320770005961051,
`56` = -0.326498041781784, `57` = -0.332226077602517, `58` = -0.33795411342325,
`59` = -0.343682149243983, `60` = -0.349410185064716, `61` = -0.355138220885449,
`62` = -0.360866256706182, `63` = -0.366594292526915, `64` = -0.372322328347648,
`65` = -0.378050364168381, `66` = -0.383778399989114, `67` = -0.389506435809847,
`68` = -0.39523447163058, `69` = -0.400962507451313, `70` = -0.406690543272047,
`71` = -0.41241857909278, `72` = -0.418146614913513, `73` = -0.423874650734246,
`74` = -0.429602686554979, `75` = -0.435330722375712, `76` = -0.441058758196445,
`77` = -0.446786794017178, `78` = -0.452514829837911, `79` = -0.458242865658644,
`80` = -0.463970901479377, `81` = -0.46969893730011, `82` = -0.475426973120843,
`83` = -0.481155008941576, `84` = -0.486883044762309, `85` = -0.492611080583042,
`86` = -0.498339116403775, `87` = -0.504067152224508, `88` = -0.509795188045241,
`89` = -0.515523223865974, `90` = -0.521251259686707, `91` = -0.526979295507441,
`92` = -0.532707331328174, `93` = -0.538435367148907, `94` = -0.54416340296964,
`95` = -0.549891438790373, `96` = -0.555619474611106, `97` = -0.561347510431839,
`98` = -0.567075546252572, `99` = -0.572803582073305, `100` = -0.578531617894038,
`101` = -0.584259653714771, `102` = -0.589987689535504, `103` = -0.595715725356237,
`104` = -0.60144376117697, `105` = -0.607171796997703, `106` = -0.612899832818436,
`107` = -0.618627868639169, `108` = -0.624355904459902, `109` = -0.630083940280635,
`110` = -0.635811976101369, `111` = -0.641540011922102, `112` = -0.647268047742835,
`113` = -0.652996083563568, `114` = -0.658724119384301, `115` = -0.664452155205034,
`116` = -0.670180191025767, `117` = -0.6759082268465, `118` = -0.681636262667233,
`119` = -0.687364298487966, `120` = -0.693092334308699, `121` = -0.698820370129432,
`122` = -0.704548405950165, `123` = -0.710276441770898, `124` = -0.716004477591631,
`125` = -0.721732513412364, `126` = -0.727460549233097, `127` = -0.73318858505383,
`128` = -0.738916620874563, `129` = -0.744644656695296, `130` = -0.750372692516029,
`131` = -0.756100728336763, `132` = -0.761828764157496), points = c(`1` = 27.84103949255,
`2` = 27.6285124735229, `3` = 27.4159854544958, `4` = 27.2034584354687,
`5` = 26.9909314164416, `6` = 26.7784043974145, `7` = 26.5658773783874,
`8` = 26.3533503593603, `9` = 26.1408233403332, `10` = 25.9282963213061,
`11` = 25.715769302279, `12` = 25.5032422832519, `13` = 25.2907152642248,
`14` = 25.0781882451977, `15` = 24.8656612261706, `16` = 24.6531342071435,
`17` = 24.4406071881164, `18` = 24.2280801690893, `19` = 24.0155531500622,
`20` = 23.8030261310351, `21` = 23.590499112008, `22` = 23.3779720929809,
`23` = 23.1654450739538, `24` = 22.9529180549267, `25` = 22.7403910358996,
`26` = 22.5278640168725, `27` = 22.3153369978454, `28` = 22.1028099788183,
`29` = 21.8902829597912, `30` = 21.6777559407641, `31` = 21.465228921737,
`32` = 21.2527019027099, `33` = 21.0401748836828, `34` = 20.8276478646557,
`35` = 20.6151208456286, `36` = 20.4025938266015, `37` = 20.1900668075744,
`38` = 19.9775397885473, `39` = 19.7650127695202, `40` = 19.5524857504931,
`41` = 19.339958731466, `42` = 19.1274317124389, `43` = 18.9149046934118,
`44` = 18.7023776743847, `45` = 18.4898506553576, `46` = 18.2773236363305,
`47` = 18.0647966173034, `48` = 17.8522695982763, `49` = 17.6397425792492,
`50` = 17.4272155602221, `51` = 17.214688541195, `52` = 17.0021615221679,
`53` = 16.7896345031408, `54` = 16.5771074841137, `55` = 16.3645804650866,
`56` = 16.1520534460595, `57` = 15.9395264270324, `58` = 15.7269994080053,
`59` = 15.5144723889782, `60` = 15.3019453699511, `61` = 15.089418350924,
`62` = 14.8768913318969, `63` = 14.6643643128698, `64` = 14.4518372938427,
`65` = 14.2393102748156, `66` = 14.0267832557885, `67` = 13.8142562367614,
`68` = 13.6017292177343, `69` = 13.3892021987072, `70` = 13.1766751796801,
`71` = 12.964148160653, `72` = 12.7516211416259, `73` = 12.5390941225988,
`74` = 12.3265671035717, `75` = 12.1140400845446, `76` = 11.9015130655175,
`77` = 11.6889860464904, `78` = 11.4764590274633, `79` = 11.2639320084362,
`80` = 11.0514049894091, `81` = 10.838877970382, `82` = 10.6263509513549,
`83` = 10.4138239323278, `84` = 10.2012969133007, `85` = 9.98876989427365,
`86` = 9.77624287524655, `87` = 9.56371585621945, `88` = 9.35118883719235,
`89` = 9.13866181816525, `90` = 8.92613479913816, `91` = 8.71360778011105,
`92` = 8.50108076108396, `93` = 8.28855374205686, `94` = 8.07602672302976,
`95` = 7.86349970400266, `96` = 7.65097268497556, `97` = 7.43844566594846,
`98` = 7.22591864692136, `99` = 7.01339162789426, `100` = 6.80086460886717,
`101` = 6.58833758984007, `102` = 6.37581057081297, `103` = 6.16328355178587,
`104` = 5.95075653275877, `105` = 5.73822951373167, `106` = 5.52570249470457,
`107` = 5.31317547567747, `108` = 5.10064845665037, `109` = 4.88812143762328,
`110` = 4.67559441859617, `111` = 4.46306739956908, `112` = 4.25054038054198,
`113` = 4.03801336151488, `114` = 3.82548634248778, `115` = 3.61295932346068,
`116` = 3.40043230443358, `117` = 3.18790528540648, `118` = 2.97537826637939,
`119` = 2.76285124735228, `120` = 2.55032422832519, `121` = 2.33779720929809,
`122` = 2.12527019027099, `123` = 1.91274317124389, `124` = 1.70021615221679,
`125` = 1.48768913318969, `126` = 1.27516211416259, `127` = 1.06263509513549,
`128` = 0.850108076108397, `129` = 0.637581057081296, `130` = 0.425054038054198,
`131` = 0.212527019027097, `132` = 0)), info = list(nfun = 3L,
predictor = "n.fjernet", effect.name = "n.fjernet", type = "main")),
n.sygdom = structure(list(n.sygdom = c(0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40), Xbeta = c(`133` = 0, `134` = 0.32236136668714,
`135` = 0.648650531337351, `136` = 0.909274081797897, `137` = 1.09719119915252,
`138` = 1.2269431700224, `139` = 1.31307128102872, `140` = 1.37011681879267,
`141` = 1.41262106993544, `142` = 1.452701773308, `143` = 1.49278247668057,
`144` = 1.53286318005315, `145` = 1.57294388342572, `146` = 1.61302458679829,
`147` = 1.65310529017085, `148` = 1.69318599354344, `149` = 1.733266696916,
`150` = 1.77334740028855, `151` = 1.81342810366113, `152` = 1.8535088070337,
`153` = 1.89358951040629, `154` = 1.93367021377884, `155` = 1.97375091715141,
`156` = 2.01383162052397, `157` = 2.05391232389658, `158` = 2.09399302726916,
`159` = 2.13407373064171, `160` = 2.17415443401433, `161` = 2.21423513738691,
`162` = 2.25431584075947, `163` = 2.29439654413205, `164` = 2.33447724750454,
`165` = 2.37455795087723, `166` = 2.41463865424957, `167` = 2.45471935762221,
`168` = 2.49480006099482, `169` = 2.53488076436739, `170` = 2.57496146774009,
`171` = 2.61504217111266, `172` = 2.65512287448523, `173` = 2.69520357785787
), points = c(`133` = 0, `134` = 11.9605572408505, `135` = 24.0668473679043,
`136` = 33.7367495824038, `137` = 40.7090287415156, `138` = 45.5232094563172,
`139` = 48.7188163378863, `140` = 50.8353739973004, `141` = 52.412407045637,
`142` = 53.8995193254604, `143` = 55.3866316052841, `144` = 56.8737438851078,
`145` = 58.3608561649314, `146` = 59.8479684447552, `147` = 61.3350807245785,
`148` = 62.8221930044026, `149` = 64.309305284226, `150` = 65.7964175640487,
`151` = 67.283529843873, `152` = 68.7706421236966, `153` = 70.257754403521,
`154` = 71.7448666833438, `155` = 73.2319789631674, `156` = 74.7190912429907,
`157` = 76.2062035228159, `158` = 77.6933158026398, `159` = 79.1804280824625,
`160` = 80.6675403622881, `161` = 82.1546526421122, `162` = 83.6417649219352,
`163` = 85.1288772017594, `164` = 86.6159894815798, `165` = 88.103101761408,
`166` = 89.5902140412232, `167` = 91.0773263210494, `168` = 92.5644386008743,
`169` = 94.0515508806979, `170` = 95.5386631605266, `171` = 97.0257754403502,
`172` = 98.5128877201739, `173` = 100)), info = list(nfun = 3L,
predictor = "n.sygdom", effect.name = "n.sygdom", type = "main")),
ecs = structure(list(ecs = c("No", "Yes"), Xbeta = c(`174` = 0,
`175` = 0.352802098746005), points = c(`174` = 0, `175` = 13.0899981598574
)), info = list(nfun = 3L, predictor = "ecs", effect.name = "ecs",
type = "main")), contra.pos = structure(list(contra.pos = c("Ipsi.",
"Contra."), Xbeta = c(`176` = 0, `177` = -0.149053853083395
), points = c(`176` = 5.53033745977221, `177` = 0)), info = list(
nfun = 3L, predictor = "contra.pos", effect.name = "contra.pos",
type = "main")), total.points = list(x = c(0, 10, 20,
30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140)), lp = list(
x = c(8.59901355289166, 27.1504878870641, 45.7019622212365,
64.253436555409, 82.8049108895814, 101.356385223754,
119.907859557926, 138.459333892099), x.real = c(-1, -0.5,
0, 0.5, 1, 1.5, 2, 2.5)), `Probability of 1 year survival` = list(
x = c(132.923978485611, 122.154519662532, 112.023605643525,
101.668496222993, 90.3441422980089, 77.0166169199793,
59.6149679036176, 31.771904926561), x.real = c(0.2, 0.3,
0.4, 0.5, 0.6, 0.7, 0.8, 0.9), fat = c("0.2", "0.3",
"0.4", "0.5", "0.6", "0.7", "0.8", "0.9"), which = c(FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE
)), `Probability of 3 years survival` = list(x = c(111.455658509363,
98.1672795067317, 87.3978451509886, 77.2669361851509, 66.9118109221416,
55.5874579746061, 42.2599719337723, 24.8583283615229), x.real = c(0.1,
0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), fat = c("0.1", "0.2",
"0.3", "0.4", "0.5", "0.6", "0.7", "0.8"), which = c(FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE)),
`Probability of 5 years survival` = list(x = c(96.3366217164868,
83.0483098712202, 72.2788509036931, 62.1479468853665, 51.7928216700398,
40.468478298201, 27.1409533137375, 9.73931852863156), x.real = c(0.1,
0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), fat = c("0.1", "0.2",
"0.3", "0.4", "0.5", "0.6", "0.7", "0.8"), which = c(FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE))), info = list(
fun = list(function (x)
surv(12, x), function (x)
surv(36, x), function (x)
surv(60, x)), lp = TRUE, lp.at = c(-1, -0.5, 0, 0.5, 1, 1.5,
2, 2.5), discrete = c(n.fjernet = FALSE, n.sygdom = FALSE,
ecs = TRUE, contra.pos = TRUE, studie = TRUE), funlabel = c("Probability of 1 year survival",
"Probability of 3 years survival", "Probability of 5 years survival"
), fun.at = NULL, fun.lp.at = NULL, Abbrev = list(), minlength = 4,
conf.int = FALSE, R = structure(c(-0.761828764157496, -0.0114560716414661,
0, 2.69520357785787, 0, 0.352802098746005, -0.149053853083395,
0), .Dim = c(2L, 4L), .Dimnames = list(NULL, c("n.fjernet",
"n.sygdom", "ecs", "contra.pos"))), sc = 37.1029486683449,
maxscale = 100, Intercept = -1.23176092093802, nint = 10,
space.used = c(main = 4, ia = 0)), class = "nomogram")
``````

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.