I'm trying to calculate the integrated discrimination improvement for two Cox regression models (time, event), using the survIDINRI package and the IDI.INF function and I have an error
This is the code for the function:
D=subset(donnees,select=c("time","status","age","smoking","hospit_HF","symptomatic_angina","cardiac2","nb_seg_LGE","ischemie"))
D$status=as.numeric(D$status==1 | D$status==2)
D=D[!is.na(apply(D,1,mean)),] ; dim(D)
mydata=D
indata2=mydata;
indata1=mydata[,-8];
indata0=mydata[,c(-7,-8)];n=nrow(D);
covs2<-as.matrix(indata2[,c(-1,-2)]);
covs1<-as.matrix(indata1[,c(-1,-2)]);
covs0<-as.matrix(indata0[,c(-1,-2)]);
t0=2
x<- IDI.INF(mydata[,1:2], covs0, covs1, t0) ;
And I get the following error message:
Error in unoecdf(cc, pdiff[case], Wi[case] * PTB.Vi[case]) :
NA/NaN/Inf in foreign function call (arg 5)
If someone have a solution it's would be great
Thanks in advance
Marilyn
> dput(round(mydata[1:700,],1))
structure(list(time = c(6.8, 6.8, 6.9, 7.8, 5.6, 6.7, 8.3, 6.6,
7.8, 3.7, 6.9, 6.5, 7, 3.4, 7.4, 6.8, 6.8, 6.9, 7.8, 0.2, 7,
5.2, 6.9, 6.4, 6.5, 6.9, 6.7, 6.9, 6.9, 3.5, 0.7, 1.9, 7.3, 6.9,
7.4, 6.9, 2, 3.1, 6.8, 8, 8.1, 6.8, 6.9, 6.9, 6.8, 0.2, 7.9,
6.9, 5.2, 8.1, 6.7, 6.8, 7.8, 8.1, 7, 6.7, 1.2, 7.8, 7.8, 6.7,
6.6, 6.9, 6.9, 6.4, 7.2, 2.1, 5.2, 7.5, 7.8, 1.1, 0.8, 1.9, 6.9,
6.9, 7.1, 6.5, 7.7, 6.9, 7.4, 6.9, 7.1, 3.6, 7.9, 6.7, 6.9, 0.4,
6.9, 5.9, 6.7, 6.8, 7.9, 6.5, 8, 5.1, 6.9, 6.9, 8.2, 7, 5.2,
7, 4.3, 8.3, 6.8, 6.7, 6.8, 6.8, 7.2, 1.5, 7.1, 5.5, 6.7, 6.8,
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, 83, 85, 69, 64, 72, 82, 73, 79, 57, 78, 63, 72, 84,
76, 74, 77, 85, 77, 59, 71, 74, 80, 84, 70, 74, 77, 82, 58, 79,
77, 83, 69, 81, 75, 65, 65, 54, 80, 73, 64, 69, 78, 62, 77, 47,
65, 58, 79, 83, 72, 69, 77, 79, 79, 75, 71, 82, 70, 83, 82, 86,
77, 51, 85, 61, 77, 63, 78, 64, 59, 71, 79, 86, 75, 77, 78, 69,
75, 67, 68, 72, 68, 52, 81, 70, 82, 68, 80, 86, 72, 70, 78, 68,
65, 69, 67, 88, 77, 67, 83, 76, 85, 79, 59, 58, 79, 79, 74, 80,
79, 71, 75, 78, 72, 61, 89, 64, 79, 54, 59, 56, 67, 59, 70, 71,
69, 64, 63, 62, 83, 80, 72, 78, 91, 78, 46, 84, 72, 68, 80, 80,
88, 77, 63, 68, 85, 56, 57, 71, 84, 84, 79, 76, 74, 74, 74, 60,
73, 79, 76, 86, 82, 79, 58, 58, 78, 73, 73, 73, 82, 70, 60, 54,
64, 77, 66, 64, 59, 74, 62, 78, 76, 85, 63, 78, 73, 81, 79, 91,
89, 56, 56, 71, 87, 88, 65, 65, 67, 69, 67, 60, 72, 81, 64, 73,
77, 65, 74, 52, 74, 72, 72, 83, 61, 51, 86, 69, 69, 69, 84, 75,
83, 77, 70, 78, 65, 79, 85, 70, 73, 63, 80, 74, 82, 43, 88, 74,
73, 77, 60, 72, 66, 73, 70, 86, 66, 79, 65, 48, 68, 56, 72, 72,
81, 82, 85, 76, 81, 64, 66, 64, 62, 44, 68, 80, 87, 59, 81, 85,
61, 83, 58, 71, 81, 86, 83, 55, 59, 66, 72, 82, 75, 64, 68, 42,
61, 76, 76, 63, 77, 76, 78, 70, 71, 79, 78, 61, 80, 64, 80, 80,
69, 65, 78, 79, 68, 85, 78, 87, 74, 80, 79, 81, 80, 81, 65, 72,
78, 82, 66, 75, 86, 41, 41, 58, 77, 59, 71, 51, 70, 48, 46, 63,
76, 88, 76, 76, 61, 44, 71, 79, 63, 67, 71, 77, 69, 84, 85, 79,
79, 70, 82, 73, 79, 51, 72, 72, 75, 72, 70, 76, 82, 73, 80, 80,
70, 68, 71, 57, 78, 82, 74, 80, 62, 80, 70, 55, 70, 76, 84, 76,
63, 60, 78, 72, 78, 76, 80, 62, 65, 68, 85, 71, 75, 78, 69, 63,
69, 60, 82, 80, 69, 64, 76, 52, 76, 58, 54, 79, 65, 76, 75, 74,
65, 81, 89, 52, 81, 89, 67, 72, 62, 53, 51, 67, 77, 52, 64, 62,
82, 76, 64, 80, 63, 78, 59, 73, 69, 68, 52, 76, 61, 62, 58, 69,
78, 86, 82, 70, 70, 75, 78, 72, 67, 54, 74, 82, 51, 69, 75, 70,
78, 73, 77, 64, 72, 82, 46, 65, 70, 68, 81, 67, 81, 76, 49, 60,
70, 68, 66, 75, 74, 70, 62, 62, 72, 43, 68, 55, 74, 65, 82, 77,
78, 61, 76, 66, 66, 75, 67, 60, 68, 72, 76, 69, 82, 69, 67, 80,
55, 79, 76, 76, 67, 66, 66, 81, 68, 75, 75, 71, 70, 57, 75, 74,
64, 71, 66, 68, 66, 92, 76, 64, 76, 55, 63, 57, 70, 79, 71, 77,
69, 62, 57, 67, 65, 56, 74, 76, 58, 78, 71, 52, 65, 75, 79, 57,
70, 66, 70, 72, 63, 64, 54, 46, 79, 63, 70, 83, 75, 57, 70, 75,
69, 65, 81, 46, 68, 65, 65, 63, 74, 75, 81, 64, 82, 61, 65, 69,
69, 83, 68, 72, 74, 79, 69, 83, 82, 85, 62, 73, 63, 75, 81, 62,
68, 85, 66, 78, 78, 68, 75, 78, 81, 68, 69, 68, 52, 83, 82, 57,
77, 55, 83, 74, 74, 64, 74, 58, 47, 74, 72, 71, 56, 66, 84, 67,
59, 69, 46, 58, 71, 76, 50, 56), smoking = c(0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0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0, 0,
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1,
0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0,
0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1)), row.names = c(NA,
-700L), class = c("tbl_df", "tbl", "data.frame"))
Related
I'm doing some analysis on a complex network. I have computed the degree correlation matrix, which looks like this:
data[1:5, 1:5]
1 2 3 4 5
1 6 19 11 16 5
2 19 10 16 12 6
3 11 16 7 11 10
4 16 12 11 5 9
5 5 6 10 9 8
And I'd like to plot it to obtain something akin to this:
I've tried to use ggplot but the results are not at all satisfying, this is my code:
library(reshape2)
library(ggplot2)
data = melt(data)
#The "melt" function was used to turn the matrix in a three column dataframe with columns named "Var1",
"Var2", and "value"
ggplot(data = data) +
theme_bw() +
geom_tile(aes(x = Var1, y = Var2, fill = value)) +
scale_fill_viridis(name = "") +
labs(x = "k2", y = "k1")
And this is what I get:
Is there any way to fix it?
P.S. Sorry if I couldn't post the images directly, but my reputation is not high enough
EDIT: I'm putting here the dput() output of my matrix, as asked in the comments:
structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), dim = c(75L, 75L), dimnames = list(
c("2", "3", "5", "6", "7", "8", "9", "10", "11", "12", "13",
"14", "15", "16", "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", "77", "79", "81"), c("2", "3", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16", "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", "77", "79", "81")))
You get the lines because you have missing values. The full range is not represented in your data. Here's one way to fill in the missing values using tidyr
library(dplyr)
library(tidyr)
full_range <- function(x) seq(min(x), max(x))
data %>%
as.data.frame() %>%
tibble::rownames_to_column("Var1") %>%
pivot_longer(-Var1, names_to="Var2") %>%
mutate(across(Var1:Var2, as.numeric)) %>% {
d <- .
expand_grid(Var1=full_range(d$Var1), Var2=full_range(d$Var2)) %>%
left_join(d) %>%
replace_na(list(value=0))
} %>%
ggplot() +
theme_bw() +
geom_tile(aes(x = Var1, y = Var2, fill = value)) +
scale_fill_viridis_c(name = "") +
labs(x = "k2", y = "k1")
that looks like this
I have patients who can have two types of outcomes.
structure(list(time = c(45.7, 2, 98.4, 87.3, 104.5, 78.2, 78.2,
9.2, 14.2, 109.6, 39.6, 109.6, 55.8, 53.8, 6, 76.1, 118.7, 4,
2, 94.4, 41.6, 7.1, 115.7, 24.4, 97.4, 15.2, 26.4, 118.7, 69,
102.5, 116.7, 58.8, 109.6, 2, 67, 70, 22.3, 87.3, 82.2, 109.6,
58.8, 33.5, 57.9, 9.2, 90.3, 23.3, 37.5, 3, 17.3, 49.7, 111.6,
84.2, 116.7, 111.6, 8.1, 30.5, 30.5, 27.4, 94.4, 6.1, 81.2, 44.7,
70, 14.2, 70, 78.2, 41.6, 4.1, 25.4, 33.5, 104.5, 17.3, 77.1,
1, 31.5, 87.3, 80.2, 116.7, 9.2, 84.2, 1, 36.5, 85.2, 99.4, 111.6,
4.1, 37.5, 4.1, 80.2, 39.5, 104.5, 6.1, 81.2, 56.8, 47.7, 66,
6.1, 44.7, 36.5, 34.5, 95.3, 92.4, 14.2, 15.2, 114.7, 68, 120.7,
2, 3, 33.5, 32.5, 55.8, 1, 54.8, 15.2, 29.5, 18.3, 29.5, 3.1,
3, 4.1, 2, 10.2, 10.1, 19.3, 49.7, 27.4, 89.3, 93.4, 59.8, 1,
61.9, 64.9, 47.7, 19.3, 8.2, 4.1, 94.4, 1, 95.3, 13.2, 79.2,
61.9, 11.1, 0, 69, 48.7, 34.5, 1, 103.5, 18.3, 72, 97.4, 97.4,
46.6, 22.3, 80.2, 34.5, 60.9, 114.7, 109.6, 2, 47.7, 98.4, 77.1,
1, 43.7, 0, 93.4, 117.7, 14.2, 37.5, 83.2, 77.1, 78.2, 8.1, 49.7,
31.4, 103.5, 30.5, 90.3, 22.3, 13.2, 37.5, 2, 107.5, 112.6, 8.1,
103.5, 19.3, 3, 35.5, 5.1, 97.4, 1, 61.9, 1, 13.1, 27.4, 12.2,
19.3, 91.3, 112.6, 109.6, 41.6, 97.4, 54.8, 99.4, 3, 114.7, 32.5,
3, 9.2, 2.1, 59.8, 112.6, 35.5, 66, 103.5, 117.7, 66.9, 55.8,
69, 3, 4, 109.6, 4.1, 81.2, 93.4, 113.6, 0, 57.9, 86.2, 11.2,
20.3, 2, 5.1, 3.1, 54.8, 55.8, 110.6, 50.7, 91.3, 45.7, 6.1,
75.1, 58.8, 2.1, 13.2, 99.4, 83.2, 16.2, 40.6, 22.3, 18.3, 100.4,
63.9, 2, 17.3, 1, 84.2, 3.1, 5, 23.3, 78.2, 40.6, 114.7, 2, 74.1,
1, 95.3, 80.2, 56.8, 94.4, 58.8, 107.5, 80.2, 5.1, 36.5, 79.2,
51.7, 115.7, 17.3, 4, 4.1, 5.1, 55.8, 79.2, 8.1, 80.2, 102.5,
86.2, 41.6, 1, 15.2, 48.7, 53.8, 82.2, 79.2, 35.5, 23.3, 32.5,
2, 40.6, 11.1, 1, 80.2, 27.4, 93.4, 78.2, 30.5, 112.6, 5.1, 2,
2, 14.2, 8.1, 2, 18.3, 64.9, 42.6, 36.5, 103.5, 55.8, 18.3, 1,
2.1, 55.8, 106.6, 2, 84.2, 6.1, 8.1, 14.2, 3, 52.8, 57.9, 1,
81.2, 50.7, 86.2, 17.3, 56.8, 1, 11.1, 8.1, 1, 94.4, 85.2, 43.7,
105.5, 78.2, 114.7, 80.1, 2, 82.2, 87.3, 90.3, 111.6, 94.4, 63.9,
85.2, 32.5, 29.5, 14.2, 75.1, 8.1, 45.7, 70, 74.1, 43.7, 40.6,
22.3, 64.9, 2, 4, 9.1, 117.7, 6.1, 12.2, 105.5, 26.4, 8.1, 32.5,
46.6, 114.7, 1, 71, 80.2, 52.8, 2, 2, 73.1, 63.9, 74.1, 85.2,
116.7, 0.9, 115.7, 66, 16.2, 54.8, 92.4, 85.2, 31.5, 2, 74.1,
9.2, 104.5, 106.6, 5.1, 29.5, 97.4, 95.3, 38.6, 105.5, 75.1,
54.8, 75.1, 100.4, 48.7, 83.2, 113.6, 75.1, 54.8, 60.9, 16.2,
44.7, 46.6, 40.6, 2, 29.5, 45.7, 116.7, 0, 4.1, 1, 85.2, 27.4,
55.8, 2, 86.2, 10.2, 77.1, 52.8, 44.7, 45.7, 80.2, 19.3, 9.2,
64.9, 116.7, 69, 22.3, 5.1, 4, 29.5, 2, 3, 4.1, 55.8, 72, 22.3,
1, 49.7, 61.9, 52.8, 42.6, 97.4, 88.3, 79.2, 48.7, 90.3, 10.1,
103.5, 16.2, 63.9, 37.5, 6.1, 99.4, 112.6, 20.2, 119.7, 90.3,
77.1, 2.1, 89.3, 88.3, 96.4, 11.1, 10.1, 53.8, 30.5, 87.3, 45.7,
41.6, 84.2, 27.4, 2.1, 24.4, 37.5, 106.6, 13.2, 84.2, 106.6,
36.5, 102.5, 0, 104.5, 24.4, 11.1, 5.1, 107.5, 2.1, 100.4, 70,
98.4, 103.5, 7.1, 1, 4.1, 22.3, 7.1, 11.1, 84.2, 101.5, 15.2,
10.1, 31.5, 2, 1, 56.8, 77.1, 10.1, 32.5, 1, 100.4, 21.3, 2,
62.9, 0, 1, 24.4, 57.9, 8.1, 3, 114.7, 0, 5.1, 15.2, 61.9, 52.8,
17.3, 104.5, 47.7, 67, 33.5, 53.8, 114.7, 115.7, 31.5, 13.2,
11.1, 0, 58.8, 1, 36.5, 1, 53.8, 11.1, 94.4, 93.4, 111.6, 108.5,
38.6, 2, 50.7, 1, 105.5, 41.6, 113.6, 45.7, 50.7, 37.5, 23.3,
99.4, 36.5, 44.6, 103.5, 20.3, 102.5, 117.7, 4.1, 4, 1, 40.6,
3.1, 49.7, 33.5, 55.8, 1, 30.5, 29.5, 119.7, 114.7, 9.2, 107.5,
9.2, 40.6, 77.1, 104.5, 72, 99.4, 84.2, 31.5, 80.2, 46.6, 64.9,
99.4, 1, 0, 3.1, 72, 27.4, 73.1, 116.7, 54.8, 2, 1, 69, 49.7,
96.4, 39.6, 30.5, 110.6, 17.3, 92.4, 32.5, 79.2, 43.7, 72, 91.3,
26.3, 5.1, 88.3, 46.6, 21.3, 113.6, 1, 37.5, 98.4, 90.3, 109.6,
62.9, 99.4, 36.5, 28.4, 120.7, 54.8, 17.3, 49.7, 76.1, 40.6,
111.6, 36.5, 33.5, 16.2, 62.9, 1, 102.5, 11.2, 14.2, 106.6, 29.5,
24.4, 84.2, 59.8, 26.4, 57.9, 0, 105.5, 22.3, 31.5, 31.5, 66,
46.6, 103.5, 91.3, 91.3, 25.4, 42.6, 51.7, 41.6, 13.2, 119.7,
3, 14.2, 10.2, 116.7, 90.3, 109.6, 1, 28.4, 113.6, 3.1, 53.8,
15.2, 9.2, 114.7, 1, 38.6, 29.5, 21.3, 2, 99.4, 82.2, 90.3, 62.9,
13.2, 90.3, 1, 51.7, 2, 40.6, 44.7, 92.4, 96.4, 4.1, 88.3, 68,
107.5, 88.3, 25.4, 120.7, 30.5, 103.5, 83.2, 89.3, 105.5, 108.5,
3.1, 0, 105.5, 99.4, 0, 108.5, 17.3, 94.4, 108.5, 4.1, 115.7,
43.7, 34.5, 55.8, 115.7, 17.3, 91.3, 90.3, 114.7, 73.1, 99.4,
56.8, 93.4, 62.9, 78.2, 0, 103.5, 2, 12.2, 101.5, 42.6, 1, 2,
111.6, 76.1, 4.1, 4.1, 35.5, 41.6, 30.5, 115.7, 38.6, 5.1, 7.1,
47.7, 31.4, 32.5, 53.8, 23.3, 38.6, 63.9, 27.4, 41.6, 13.2, 0,
56.8, 44.7, 91.3, 29.5, 97.4, 90.3, 4, 29.5, 84.2, 108.5, 51.7,
34.5, 98.4, 2, 2, 48.7, 118.7, 49.7, 73.1, 36.5, 112.6, 1, 111.6,
5.1, 62.9, 90.3, 83.2, 86.2, 12.2, 62.9, 14.2, 57.9, 53.8, 40.6,
48.7, 10.1, 28.4, 9.2, 68, 97.4, 54.8, 84.2, 105.5, 74.1, 1,
47.7, 71, 116.7, 81.2, 1, 58.8, 80.2, 78.2, 14.1, 39.6, 1, 4.1,
1, 86.2, 58.8, 0, 103.5, 82.2, 87.3, 107.5, 98.4, 3.1, 39.6,
8.1, 68, 100.4, 3.1, 18.3, 104.5, 75.1, 68, 39.6, 1, 108.5, 74.1,
84.2, 23.3, 118.7, 106.6, 7.1, 55.8, 105.5, 0, 7.1, 2, 50.7,
90.3, 76.1, 95.3, 2.1, 74.1, 119.7, 1, 77.1, 1, 10.1, 22.3, 28.4,
2, 3, 78.2, 33.5, 3, 3, 27.4, 2, 47.7, 15.2, 13.2, 20.3, 97.4,
40.6, 76.1, 58.8, 2, 50.7, 11.2, 78.2, 75.1, 100.4, 21.3, 28.4,
4.1, 59.8, 86.2, 39.6, 9.2, 92.4, 5.1, 0, 102.5, 70, 26.4, 89.3,
118.7, 8.1, 2, 92.4, 20.3, 75.1, 115.7, 31.5, 96.4, 66, 64.9,
79.2, 4.1, 0, 114.7, 2, 3.1, 30.5, 106.6, 117.7, 1, 20.3, 35.5,
38.6, 32.5, 1, 6.1, 10.1, 96.4, 8.1, 7.1, 115.7, 2, 66, 42.6,
69, 114.7, 10.1, 111.6, 5.1, 83.2, 78.2, 8.1, 30.5, 5, 13.2,
41.6, 85.2, 45.7, 92.4, 91.3, 9.1, 109.6, 31.5, 31.5, 28.4, 63.9,
72, 0.9, 31.5, 101.5, 76.1, 99.4, 81.2, 69, 75.1, 4.1, 5.1, 55.8,
64.9, 68, 4.1, 47.7, 78.2, 109.6, 8.1, 66, 19.3, 9.2, 67, 71,
55.8, 92.4, 3.1, 52.8, 55.8, 62.9, 6.1, 113.6, 90.3, 72, 5, 35.5,
115.7, 46.6, 15.2, 28.4, 9.2, 102.5, 4, 53.8, 97.4, 56.8, 102.5,
74.1, 14.2, 17.3, 117.7, 4, 2.1, 77.1, 3.1, 102.5, 13.2, 66,
3, 60.9, 1, 26.4, 114.7, 111.6, 60.9, 9.1, 18.3, 59.8, 11.1,
19.3, 71, 50.7, 64.9, 4, 6.1, 120.7, 29.5, 88.3, 66, 72, 59.8,
16.3, 93.4, 50.7, 114.7, 19.3, 87.3, 2, 22.3, 70, 52.8, 32.5,
33.5, 2, 18.3, 74.1, 3.1, 0, 118.7, 111.6, 82.2, 1, 42.6, 4.1,
72, 98.4, 58.8, 91.3, 66, 48.7, 75.1, 41.6, 34.5, 14.2, 116.7,
13.2, 75.1, 118.7, 45.7, 50.7, 120.7, 95.3, 12.2, 69, 63.9, 6,
62.9, 0, 49.7, 90.3, 74.1, 1, 14.2, 116.7, 70, 54.8, 14.2, 33.5,
47.7, 79.2, 115.7, 2, 1, 3, 113.6, 45.7, 88.3, 13.2, 53.8, 63.9,
95.3, 18.3, 31.5, 102.5, 68, 37.5, 106.6, 76.1, 74.1, 9.1, 43.7,
8.1, 117.7, 48.7, 94.4, 19.3, 2, 6.1, 26.4, 30.5, 97.4, 39.6,
103.5, 68, 96.4, 2, 111.6, 59.8, 79.2, 62.9, 51.7, 112.6, 1,
107.5, 3, 37.5, 58.8, 12.2, 59.8, 61.9, 25.3, 106.6, 71, 35.5,
8.1, 71, 12.2, 31.5, 3, 87.3, 116.7, 52.8, 78.2, 102.5, 97.4,
2, 41.6, 53.8, 67, 119.7, 93.4, 20.3, 4.1, 117.7, 42.7, 20.3,
29.5, 48.7, 107.5, 30.5, 36.5, 63.9, 80.2, 1, 6.1, 5.1, 67, 81.2,
97.4, 8.1, 0, 6.1, 57.9, 1, 1, 5.1, 99.4, 8.1, 41.6, 78.2, 44.7,
48.7, 38.6, 67, 103.5, 91.3, 106.6, 58.8, 20.3, 16.2, 62.9, 36.5,
15.2, 13.2, 115.7, 10.1, 15.2, 58.8, 47.7, 6.1, 4.1, 95.3, 17.3,
4.1, 2.1, 90.3, 13.2, 27.4, 54.8, 61.9, 68, 10.1, 70, 23.3, 25.4,
11.1, 83.2, 50.7, 29.5, 58.8, 31.5, 84.2, 61.9, 84.2, 110.6,
68, 17.3, 16.2, 11.1, 97.4, 28.4, 81.2, 62.9, 14.2, 80.2, 66,
116.7, 55.8, 9.2, 8.1, 32.5, 1, 15.2, 41.6, 85.2, 1, 84.2, 2,
1, 97.4, 74.1, 119.7, 57.9, 8.1, 0, 41.6, 18.3, 4.1, 2, 3, 1,
76.1, 95.3, 2.1, 97.4, 17.3, 3, 5.1, 6.1, 84.2, 90.3, 7.1, 2.1,
2, 49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
1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,
0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1,
1, 0, 0, 0, 0)), row.names = c(NA, -1329L), class = "data.frame")
Does it make sense to present survival curves for two different type of events at the same time? If so is it possible to do it with R (ggplot) ?
survie_cmd_test<-survfit(Surv(time,status)~1, data=mydata)
ggsurvplot(
survie_cmd_test,
data = mydata,
size = 0.5, # change line size
palette =
c("#E7B800", "#2E9FDF"),# custom color palettes
conf.int = TRUE, # Add confidence interval
pval = TRUE, # Add p-value
legend.labs =
c("Patients"), # Change legend labels
risk.table.height = 0.25, # Useful to change when you have multiple groups
ggtheme = theme_bw(),# Change ggplot2 theme
xlab="Time (months)",
ylab="Survival probability"
)
These codes give me only one curve while i am expecting two curves (one for the category 1 and another for the category 2)
You have three categories for "ss_tp" ("0", "1", "2"), so you can plot the three groups, or only "ss_tp == 1" and "ss_tp == 2", i.e.
library(tidyverse)
library(survival)
library(survminer)
df <- mydata
survie_cmd_test<-survfit(Surv(time,status)~1, data=df)
ggsurvplot(
survie_cmd_test,
data = df,
size = 0.5, # change line size
palette =
c("#E7B800", "#2E9FDF"),# custom color palettes
conf.int = TRUE, # Add confidence interval
pval = TRUE, # Add p-value
legend.labs =
c("Patients"), # Change legend labels
risk.table.height = 0.25, # Useful to change when you have multiple groups
ggtheme = theme_bw(),# Change ggplot2 theme
xlab="Time (months)",
ylab="Survival probability"
)
#> Warning in .pvalue(fit, data = data, method = method, pval = pval, pval.coord = pval.coord, : There are no survival curves to be compared.
#> This is a null model.
(problematic plot)
survie_cmd_test<-survfit(Surv(time,status)~ss_tp, data=df)
ggsurvplot(
survie_cmd_test,
data = df,
size = 0.5, # change line size
# palette =
# c("#E7B800", "#2E9FDF"),# custom color palettes
conf.int = TRUE, # Add confidence interval
pval = TRUE, # Add p-value
# legend.labs =
# c("Patients"), # Change legend labels
risk.table.height = 0.25, # Useful to change when you have multiple groups
ggtheme = theme_bw(),# Change ggplot2 theme
xlab="Time (months)",
ylab="Survival probability"
)
# for only ss_tp = 1 verses ss+tp = 2
survie_cmd_test<-survfit(Surv(time,status)~ss_tp, data=df[df$ss_tp != 0,])
ggsurvplot(
survie_cmd_test,
data = df,
size = 0.5, # change line size
# palette =
# c("#E7B800", "#2E9FDF"),# custom color palettes
conf.int = TRUE, # Add confidence interval
pval = TRUE, # Add p-value
# legend.labs =
# c("Patients"), # Change legend labels
risk.table.height = 0.25, # Useful to change when you have multiple groups
ggtheme = theme_bw(),# Change ggplot2 theme
xlab="Time (months)",
ylab="Survival probability"
)
I'm creating a cure model in R to predict Loan Default. I'm seeking someone to help me debug this error. I think it may have to do with my columns.
library(smcure)
smcure(Surv(DURATION, DEFAULT) ~ CHK_ACCT+HISTORY+NEW_CAR+USED_CAR+FURNITURE+`RADIO/TV`+EDUCATION+
RETRAINING+AMOUNT+SAV_ACCT+EMPLOYMENT+INSTALL_RATE+MALE_DIV+MALE_SINGLE+MALE_MAR_or_WID+
`CO-APPLICANT`+GUARANTOR+PRESENT_RESIDENT+REAL_ESTATE+PROP_UNKN_NONE+AGE+OTHER_INSTALL+RENT+
OWN_RES+NUM_CREDITS+JOB+NUM_DEPENDENTS+TELEPHONE+FOREIGN,
cureform=~CHK_ACCT+HISTORY+NEW_CAR+USED_CAR+FURNITURE+`RADIO/TV`+EDUCATION+RETRAINING+AMOUNT+SAV_ACCT+
EMPLOYMENT+INSTALL_RATE+MALE_DIV+MALE_SINGLE+MALE_MAR_or_WID+`CO-APPLICANT`+GUARANTOR+PRESENT_RESIDENT+
REAL_ESTATE+PROP_UNKN_NONE+AGE+OTHER_INSTALL+RENT+OWN_RES+NUM_CREDITS+JOB+NUM_DEPENDENTS+
TELEPHONE+FOREIGN,
model="ph", data = CD)
Error in while (convergence > eps & i < emmax) { :
missing value where TRUE/FALSE needed
Does anyone know what this error may mean?
Attached I have a subset of the data I used.
Data
structure(list(CHK_ACCT = c(0, 1, 3, 0, 0, 3, 3, 1, 3, 1, 1,
0, 1, 0, 0, 0, 3, 0, 1, 3, 3, 0, 0, 1, 3, 0, 3, 2, 1, 0, 1, 0,
1, 3, 2, 1, 3, 2, 2, 1, 3, 1, 1, 0, 0, 3, 3, 0, 3, 3, 1, 1, 3,
3, 1, 3, 1, 3, 2, 0, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 0, 1,
0, 0, 0, 1, 3, 1, 3, 3, 3, 0, 0, 3, 1, 1, 0, 0, 3, 0, 3, 2, 1,
1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 0, 1, 1, 2, 1, 3, 0, 3,
0, 0, 0, 1, 0, 3, 3, 2, 1, 0, 0, 1, 1, 0, 1, 0, 3, 3, 3, 3, 3,
1, 1, 2, 2, 1, 0, 0, 3, 1, 0, 3, 0, 3, 3, 3, 2, 1, 1, 0, 0, 0,
1, 3, 3, 3, 3, 1, 3, 3, 0, 1, 3, 1, 0, 3, 1, 1, 0, 3, 0, 0, 3,
0, 3, 1, 0, 3, 1, 3, 1, 1, 0, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 1
), DURATION = c(6, 48, 12, 42, 24, 36, 24, 36, 12, 30, 12, 48,
12, 24, 15, 24, 24, 30, 24, 24, 9, 6, 10, 12, 10, 6, 6, 12, 7,
60, 18, 24, 18, 12, 12, 45, 48, 18, 10, 9, 30, 12, 18, 30, 48,
11, 36, 6, 11, 12, 24, 27, 12, 18, 36, 6, 12, 36, 18, 36, 9,
15, 36, 48, 24, 27, 12, 12, 36, 36, 36, 7, 8, 42, 36, 12, 42,
11, 54, 30, 24, 15, 18, 24, 10, 12, 18, 36, 18, 12, 12, 12, 12,
24, 12, 54, 12, 18, 36, 20, 24, 36, 6, 9, 12, 24, 18, 12, 24,
14, 6, 15, 18, 36, 12, 48, 42, 10, 33, 12, 21, 24, 12, 10, 18,
12, 12, 12, 12, 12, 48, 36, 15, 18, 60, 12, 27, 12, 15, 12, 6,
36, 27, 18, 21, 48, 6, 12, 36, 18, 6, 10, 36, 24, 24, 12, 9,
12, 24, 6, 24, 18, 15, 10, 36, 6, 18, 11, 24, 24, 15, 12, 24,
8, 21, 30, 12, 6, 12, 21, 36, 36, 21, 24, 18, 15, 9, 16, 12,
18, 24, 48, 27, 6, 45, 9, 6, 12, 24, 18), HISTORY = c(4, 2, 4,
2, 3, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 0, 2, 2, 4, 2, 4, 4,
4, 2, 0, 1, 2, 3, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 2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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), AMOUNT = c(1169,
5951, 2096, 7882, 4870, 9055, 2835, 6948, 3059, 5234, 1295, 4308,
1567, 1199, 1403, 1282, 2424, 8072, 12579, 3430, 2134, 2647,
2241, 1804, 2069, 1374, 426, 409, 2415, 6836, 1913, 4020, 5866,
1264, 1474, 4746, 6110, 2100, 1225, 458, 2333, 1158, 6204, 6187,
6143, 1393, 2299, 1352, 7228, 2073, 2333, 5965, 1262, 3378, 2225,
783, 6468, 9566, 1961, 6229, 1391, 1537, 1953, 14421, 3181, 5190,
2171, 1007, 1819, 2394, 8133, 730, 1164, 5954, 1977, 1526, 3965,
4771, 9436, 3832, 5943, 1213, 1568, 1755, 2315, 1412, 1295, 12612,
2249, 1108, 618, 1409, 797, 3617, 1318, 15945, 2012, 2622, 2337,
7057, 1469, 2323, 932, 1919, 2445, 11938, 6458, 6078, 7721, 1410,
1449, 392, 6260, 7855, 1680, 3578, 7174, 2132, 4281, 2366, 1835,
3868, 1768, 781, 1924, 2121, 701, 639, 1860, 3499, 8487, 6887,
2708, 1984, 10144, 1240, 8613, 766, 2728, 1881, 709, 4795, 3416,
2462, 2288, 3566, 860, 682, 5371, 1582, 1346, 1924, 5848, 7758,
6967, 1282, 1288, 339, 3512, 1898, 2872, 1055, 1262, 7308, 909,
2978, 1131, 1577, 3972, 1935, 950, 763, 2064, 1414, 3414, 7485,
2577, 338, 1963, 571, 9572, 4455, 1647, 3777, 884, 1360, 5129,
1175, 674, 3244, 4591, 3844, 3915, 2108, 3031, 1501, 1382, 951,
2760, 4297), SAV_ACCT = c(4, 0, 0, 0, 0, 4, 2, 0, 3, 0, 0, 0,
0, 0, 0, 1, 4, 4, 0, 2, 0, 2, 0, 1, 4, 0, 0, 3, 0, 0, 3, 0, 1,
4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 0, 2, 2, 0, 1, 4, 0, 0, 4,
0, 4, 4, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0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 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 1, 1), AGE = c(67, 22, 49, 45, 53, 35,
53, 35, 61, 28, 25, 24, 22, 60, 28, 32, 53, 25, 44, 31, 48,
44, 48, 44, 26, 36, 39, 42, 34, 63, 36, 27, 30, 57, 33, 25,
31, 37, 37, 24, 30, 26, 44, 24, 58, 35, 39, 23, 39, 28, 29,
30, 25, 31, 57, 26, 52, 31, 23, 23, 27, 50, 61, 25, 26, 48,
29, 22, 37, 25, 30, 46, 51, 41, 40, 66, 34, 51, 39, 22, 44,
47, 24, 58, 52, 29, 27, 47, 30, 28, 56, 54, 33, 20, 54, 58,
61, 34, 36, 36, 41, 24, 24, 35, 26, 39, 39, 32, 30, 35, 31,
23, 28, 25, 35, 47, 30, 27, 23, 36, 25, 41, 24, 63, 27, 30,
40, 30, 34, 29, 24, 29, 27, 47, 21, 38, 27, 66, 35, 44, 27,
30, 27, 22, 23, 30, 39, 51, 28, 46, 42, 38, 24, 29, 36, 20,
48, 45, 38, 34, 36, 30, 36, 70, 36, 32, 33, 20, 25, 31, 33,
26, 34, 33, 26, 53, 42, 52, 31, 65, 28, 30, 40, 50, 36, 31,
74, 68, 20, 33, 54, 34, 36, 29, 21, 34, 28, 27, 36, 40),
OTHER_INSTALL = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0,
1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0,
1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1)), row.names = c(NA,
-200L), class = c("tbl_df", "tbl", "data.frame"))
I am working on predicting intra-day sales for a retailer. We want to know if we can predict sales through the rest of the day, based off sales within that day. I'm working with roughly 3 years of data in a time series, which has given me roughly 26,000 rows of data.
I've never worked with a time series this large so my approach might be off. Or auto.arima() may not have been made to handle data this large.
I've tried limiting my data down to even 300 rows and had marginal success, but have not found anything that works with my larger data set. auto.arima() doesn't even have a by = argument from what I can find.
my_ts <- structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3,
3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 4, 1,
1, 0, 3, 1, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
1, 9, 1, 6, 5, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 0, 3, 5, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3, 1, 0, 0, 6, 0, 6, 0, 1, 2, 3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 4, 6, 5, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 2,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8,
1, 2, 0, 4, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
1, 6, 7, 0, 1, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 5, 0, 2, 1, 4, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 2, 1, 4, 7, 5, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 0, 4, 6, 2, 1, 3, 5, 3, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 3, 0, 1, 1, 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 0, 0), index = structure(c(1435190400,
1435194000, 1435197600, 1435201200, 1435204800, 1435208400, 1435212000,
1435215600, 1435219200, 1435222800, 1435226400, 1435230000, 1435233600,
1435237200, 1435240800, 1435244400, 1435248000, 1435251600, 1435255200,
1435258800, 1435262400, 1435266000, 1435269600, 1435273200, 1435276800,
1435280400, 1435284000, 1435287600, 1435291200, 1435294800, 1435298400,
1435302000, 1435305600, 1435309200, 1435312800, 1435316400, 1435320000,
1435323600, 1435327200, 1435330800, 1435334400, 1435338000, 1435341600,
1435345200, 1435348800, 1435352400, 1435356000, 1435359600, 1435363200,
1435366800, 1435370400, 1435374000, 1435377600, 1435381200, 1435384800,
1435388400, 1435392000, 1435395600, 1435399200, 1435402800, 1435406400,
1435410000, 1435413600, 1435417200, 1435420800, 1435424400, 1435428000,
1435431600, 1435435200, 1435438800, 1435442400, 1435446000, 1435449600,
1435453200, 1435456800, 1435460400, 1435464000, 1435467600, 1435471200,
1435474800, 1435478400, 1435482000, 1435485600, 1435489200, 1435492800,
1435496400, 1435500000, 1435503600, 1435507200, 1435510800, 1435514400,
1435518000, 1435521600, 1435525200, 1435528800, 1435532400, 1435536000,
1435539600, 1435543200, 1435546800, 1435550400, 1435554000, 1435557600,
1435561200, 1435564800, 1435568400, 1435572000, 1435575600, 1435579200,
1435582800, 1435586400, 1435590000, 1435593600, 1435597200, 1435600800,
1435604400, 1435608000, 1435611600, 1435615200, 1435618800, 1435622400,
1435626000, 1435629600, 1435633200, 1435636800, 1435640400, 1435644000,
1435647600, 1435651200, 1435654800, 1435658400, 1435662000, 1435665600,
1435669200, 1435672800, 1435676400, 1435680000, 1435683600, 1435687200,
1435690800, 1435694400, 1435698000, 1435701600, 1435705200, 1435708800,
1435712400, 1435716000, 1435719600, 1435723200, 1435726800, 1435730400,
1435734000, 1435737600, 1435741200, 1435744800, 1435748400, 1435752000,
1435755600, 1435759200, 1435762800, 1435766400, 1435770000, 1435773600,
1435777200, 1435780800, 1435784400, 1435788000, 1435791600, 1435795200,
1435798800, 1435802400, 1435806000, 1435809600, 1435813200, 1435816800,
1435820400, 1435824000, 1435827600, 1435831200, 1435834800, 1435838400,
1435842000, 1435845600, 1435849200, 1435852800, 1435856400, 1435860000,
1435863600, 1435867200, 1435870800, 1435874400, 1435878000, 1435881600,
1435885200, 1435888800, 1435892400, 1435896000, 1435899600, 1435903200,
1435906800, 1435910400, 1435914000, 1435917600, 1435921200, 1435924800,
1435928400, 1435932000, 1435935600, 1435939200, 1435942800, 1435946400,
1435950000, 1435953600, 1435957200, 1435960800, 1435964400, 1435968000,
1435971600, 1435975200, 1435978800, 1435982400, 1435986000, 1435989600,
1435993200, 1435996800, 1436000400, 1436004000, 1436007600, 1436011200,
1436014800, 1436018400, 1436022000, 1436025600, 1436029200, 1436032800,
1436036400, 1436040000, 1436043600, 1436047200, 1436050800, 1436054400,
1436058000, 1436061600, 1436065200, 1436068800, 1436072400, 1436076000,
1436079600, 1436083200, 1436086800, 1436090400, 1436094000, 1436097600,
1436101200, 1436104800, 1436108400, 1436112000, 1436115600, 1436119200,
1436122800, 1436126400, 1436130000, 1436133600, 1436137200, 1436140800,
1436144400, 1436148000, 1436151600, 1436155200, 1436158800, 1436162400,
1436166000, 1436169600, 1436173200, 1436176800, 1436180400, 1436184000,
1436187600, 1436191200, 1436194800, 1436198400, 1436202000, 1436205600,
1436209200, 1436212800, 1436216400, 1436220000, 1436223600, 1436227200,
1436230800, 1436234400, 1436238000, 1436241600, 1436245200, 1436248800,
1436252400, 1436256000, 1436259600, 1436263200, 1436266800, 1436270400,
1436274000, 1436277600, 1436281200, 1436284800, 1436288400, 1436292000,
1436295600, 1436299200, 1436302800, 1436306400, 1436310000, 1436313600,
1436317200, 1436320800, 1436324400, 1436328000, 1436331600, 1436335200,
1436338800, 1436342400, 1436346000, 1436349600, 1436353200, 1436356800,
1436360400, 1436364000, 1436367600, 1436371200, 1436374800, 1436378400,
1436382000, 1436385600, 1436389200, 1436392800, 1436396400, 1436400000,
1436403600, 1436407200, 1436410800, 1436414400, 1436418000, 1436421600,
1436425200, 1436428800, 1436432400, 1436436000, 1436439600, 1436443200,
1436446800, 1436450400, 1436454000, 1436457600, 1436461200, 1436464800,
1436468400, 1436472000, 1436475600, 1436479200, 1436482800, 1436486400,
1436490000, 1436493600, 1436497200, 1436500800, 1436504400, 1436508000,
1436511600, 1436515200, 1436518800, 1436522400, 1436526000, 1436529600,
1436533200, 1436536800, 1436540400, 1436544000, 1436547600, 1436551200,
1436554800, 1436558400, 1436562000, 1436565600, 1436569200, 1436572800,
1436576400, 1436580000, 1436583600, 1436587200, 1436590800, 1436594400,
1436598000, 1436601600, 1436605200, 1436608800, 1436612400, 1436616000,
1436619600, 1436623200, 1436626800, 1436630400, 1436634000, 1436637600,
1436641200, 1436644800, 1436648400, 1436652000, 1436655600, 1436659200,
1436662800, 1436666400, 1436670000, 1436673600, 1436677200, 1436680800,
1436684400, 1436688000, 1436691600, 1436695200, 1436698800, 1436702400,
1436706000, 1436709600, 1436713200, 1436716800, 1436720400, 1436724000,
1436727600, 1436731200, 1436734800, 1436738400, 1436742000, 1436745600,
1436749200, 1436752800, 1436756400, 1436760000, 1436763600, 1436767200,
1436770800, 1436774400, 1436778000, 1436781600, 1436785200, 1436788800,
1436792400, 1436796000, 1436799600, 1436803200, 1436806800, 1436810400,
1436814000, 1436817600, 1436821200, 1436824800, 1436828400, 1436832000,
1436835600, 1436839200, 1436842800, 1436846400, 1436850000, 1436853600,
1436857200, 1436860800, 1436864400, 1436868000, 1436871600, 1436875200,
1436878800, 1436882400, 1436886000, 1436889600, 1436893200, 1436896800,
1436900400, 1436904000, 1436907600, 1436911200, 1436914800, 1436918400,
1436922000, 1436925600, 1436929200, 1436932800, 1436936400, 1436940000,
1436943600, 1436947200, 1436950800, 1436954400, 1436958000, 1436961600,
1436965200, 1436968800, 1436972400, 1436976000, 1436979600, 1436983200,
1436986800, 1436990400, 1436994000, 1436997600, 1437001200, 1437004800,
1437008400, 1437012000, 1437015600, 1437019200, 1437022800, 1437026400,
1437030000, 1437033600, 1437037200, 1437040800, 1437044400, 1437048000,
1437051600, 1437055200, 1437058800, 1437062400, 1437066000, 1437069600,
1437073200, 1437076800, 1437080400, 1437084000, 1437087600, 1437091200,
1437094800, 1437098400, 1437102000, 1437105600, 1437109200, 1437112800,
1437116400, 1437120000, 1437123600, 1437127200, 1437130800, 1437134400,
1437138000, 1437141600, 1437145200, 1437148800, 1437152400, 1437156000,
1437159600, 1437163200, 1437166800, 1437170400, 1437174000, 1437177600,
1437181200, 1437184800, 1437188400, 1437192000, 1437195600, 1437199200,
1437202800, 1437206400, 1437210000, 1437213600, 1437217200, 1437220800,
1437224400, 1437228000, 1437231600, 1437235200, 1437238800, 1437242400,
1437246000, 1437249600, 1437253200, 1437256800, 1437260400, 1437264000,
1437267600, 1437271200, 1437274800, 1437278400, 1437282000, 1437285600,
1437289200, 1437292800, 1437296400, 1437300000, 1437303600, 1437307200,
1437310800, 1437314400, 1437318000, 1437321600, 1437325200, 1437328800,
1437332400, 1437336000, 1437339600, 1437343200, 1437346800, 1437350400,
1437354000, 1437357600, 1437361200, 1437364800, 1437368400, 1437372000,
1437375600, 1437379200, 1437382800, 1437386400, 1437390000, 1437393600,
1437397200, 1437400800, 1437404400, 1437408000, 1437411600, 1437415200,
1437418800, 1437422400, 1437426000, 1437429600, 1437433200, 1437436800,
1437440400, 1437444000, 1437447600, 1437451200, 1437454800, 1437458400,
1437462000, 1437465600, 1437469200, 1437472800, 1437476400, 1437480000,
1437483600, 1437487200, 1437490800, 1437494400, 1437498000, 1437501600,
1437505200, 1437508800, 1437512400, 1437516000, 1437519600, 1437523200,
1437526800, 1437530400, 1437534000, 1437537600, 1437541200, 1437544800,
1437548400, 1437552000, 1437555600, 1437559200, 1437562800, 1437566400,
1437570000, 1437573600, 1437577200, 1437580800, 1437584400, 1437588000,
1437591600, 1437595200, 1437598800, 1437602400, 1437606000, 1437609600,
1437613200, 1437616800, 1437620400, 1437624000, 1437627600, 1437631200,
1437634800, 1437638400, 1437642000, 1437645600, 1437649200, 1437652800,
1437656400, 1437660000, 1437663600, 1437667200, 1437670800, 1437674400,
1437678000, 1437681600, 1437685200, 1437688800, 1437692400, 1437696000,
1437699600, 1437703200, 1437706800, 1437710400, 1437714000, 1437717600,
1437721200, 1437724800, 1437728400, 1437732000, 1437735600, 1437739200,
1437742800, 1437746400, 1437750000, 1437753600, 1437757200, 1437760800,
1437764400, 1437768000, 1437771600, 1437775200, 1437778800, 1437782400,
1437786000, 1437789600, 1437793200, 1437796800, 1437800400, 1437804000,
1437807600, 1437811200, 1437814800, 1437818400, 1437822000, 1437825600,
1437829200, 1437832800, 1437836400, 1437840000, 1437843600, 1437847200,
1437850800, 1437854400, 1437858000, 1437861600, 1437865200, 1437868800,
1437872400, 1437876000, 1437879600, 1437883200, 1437886800, 1437890400,
1437894000, 1437897600, 1437901200, 1437904800, 1437908400, 1437912000,
1437915600, 1437919200, 1437922800, 1437926400, 1437930000, 1437933600,
1437937200, 1437940800, 1437944400, 1437948000, 1437951600, 1437955200,
1437958800, 1437962400, 1437966000, 1437969600, 1437973200, 1437976800,
1437980400, 1437984000, 1437987600, 1437991200, 1437994800, 1437998400,
1438002000, 1438005600, 1438009200, 1438012800, 1438016400, 1438020000,
1438023600, 1438027200, 1438030800, 1438034400, 1438038000, 1438041600,
1438045200, 1438048800, 1438052400, 1438056000, 1438059600, 1438063200,
1438066800, 1438070400, 1438074000, 1438077600, 1438081200, 1438084800,
1438088400, 1438092000, 1438095600, 1438099200, 1438102800, 1438106400,
1438110000, 1438113600, 1438117200, 1438120800, 1438124400, 1438128000,
1438131600, 1438135200, 1438138800, 1438142400, 1438146000, 1438149600,
1438153200, 1438156800, 1438160400, 1438164000, 1438167600, 1438171200,
1438174800, 1438178400, 1438182000, 1438185600, 1438189200, 1438192800,
1438196400, 1438200000, 1438203600, 1438207200, 1438210800, 1438214400,
1438218000, 1438221600, 1438225200, 1438228800, 1438232400, 1438236000,
1438239600, 1438243200, 1438246800, 1438250400, 1438254000, 1438257600,
1438261200, 1438264800, 1438268400, 1438272000, 1438275600, 1438279200,
1438282800, 1438286400, 1438290000, 1438293600, 1438297200, 1438300800,
1438304400, 1438308000, 1438311600, 1438315200, 1438318800, 1438322400,
1438326000, 1438329600, 1438333200, 1438336800, 1438340400, 1438344000,
1438347600, 1438351200, 1438354800, 1438358400, 1438362000, 1438365600,
1438369200, 1438372800, 1438376400, 1438380000, 1438383600, 1438387200,
1438390800, 1438394400, 1438398000, 1438401600, 1438405200, 1438408800,
1438412400, 1438416000, 1438419600, 1438423200, 1438426800, 1438430400,
1438434000, 1438437600, 1438441200, 1438444800, 1438448400, 1438452000,
1438455600, 1438459200, 1438462800, 1438466400, 1438470000, 1438473600,
1438477200, 1438480800, 1438484400, 1438488000, 1438491600, 1438495200,
1438498800, 1438502400, 1438506000, 1438509600, 1438513200, 1438516800,
1438520400, 1438524000, 1438527600, 1438531200, 1438534800, 1438538400,
1438542000, 1438545600, 1438549200, 1438552800, 1438556400, 1438560000,
1438563600, 1438567200, 1438570800, 1438574400, 1438578000, 1438581600,
1438585200, 1438588800, 1438592400, 1438596000, 1438599600, 1438603200,
1438606800, 1438610400, 1438614000, 1438617600, 1438621200, 1438624800,
1438628400, 1438632000, 1438635600, 1438639200, 1438642800, 1438646400,
1438650000, 1438653600, 1438657200, 1438660800, 1438664400, 1438668000,
1438671600, 1438675200, 1438678800, 1438682400, 1438686000, 1438689600,
1438693200, 1438696800, 1438700400, 1438704000, 1438707600, 1438711200,
1438714800, 1438718400, 1438722000, 1438725600, 1438729200, 1438732800,
1438736400, 1438740000, 1438743600, 1438747200, 1438750800, 1438754400,
1438758000, 1438761600, 1438765200, 1438768800, 1438772400, 1438776000,
1438779600, 1438783200, 1438786800), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), class = c("zooreg", "zoo"), frequency = 24)
fit1 <-auto.arima(my_ts,seasonal = TRUE)
I was hoping to get a model through arima, but I'm only getting the error:
"Error in seq.default(head(tt, 1), tail(tt, 1), deltat) :
'by' argument is much too small"
I'm new to R. I want to create a stacked barplot based on the following data. I want to plot these data into a stacked barplot that describes percentage of disease score for each combination of genotype and race in x axis, e.g. 76R-race 1, rmc-race 1. As well how to simplify the x axis, by splitting each race to have 76R and rmc combination instead of labelling each combination, i.e. instead of labelling each bar with 76R-race 1, rmc-race 1, etc, how to label race 1 as main axis and have 76R and rmc as sub-axis, and so on.
disease.nov <- data.frame(disease.score = c(0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
genotype=gl(2,52,624, labels=c("76R","rmc")),
race=gl(6,104,624, labels=c("race 1","race 2","race 3","WAC 7673","WAC 7591","control")))
I'm not sure if this is what you're looking for:
library(ggplot2)
library(scales)
ggplot(disease.nov, aes(x=genotype, fill=factor(disease.score))) +
geom_bar(position="fill") +
facet_wrap(~ race) +
scale_y_continuous(labels = percent_format())
Which produces: