# modeling: null residuals values

Hello!

I am trygng to study the normality of the residuals values of a model, but it gives me null values:

cv.lasso\$residuals
NULL
cv.ridge\$residuals
NULL

I know that when it happens it means at the model is not good.
Can anybody just see if it whar I did is right?
Thank you.

I tryed:

sapply(dat, function(x) sum(is.na(x)))

datOHE <- model.matrix(sex~.-1, dat)

train<-datOHE[1:317,]
test<-datOHE[318:nrow(datOHE),]

dim(train)
dim(test)

table(dat[1:317,]\$sex)
table(dat[318:nrow(dat),]\$sex)

##ridge

install.packages("MASS")
library(MASS)
library(glmnet)

X<-data.matrix(subset(train, select=-salary))

Y<-data.matrix(dat[1:317,]\$salary)

str(X)

set.seed(42)
cv.ridge<-cv.glmnet(X, Y, family="gaussian", alpha=0, type.measure="mse")

plot(cv.ridge)

cv.ridge\$lambda.min

min(cv.ridge\$cvm)

coef(cv.ridge, s=cv.ridge\$lambda.min)

predict.glmnet(cv.ridge\$glmnet.fit, newx=X[1:2,], s=cv.ridge\$lambda.min)

##Lasso

set.seed(42)
cv.lasso <- cv.glmnet(X, Y, family='gaussian', alpha=1, type.measure='mse')

plot(cv.lasso)

cv.lasso\$lambda.min

min(cv.lasso\$cvm)

predict.glmnet(cv.lasso\$glmnet.fit, newx=X[1:2,], s=cv.lasso\$lambda.min)

cv.lasso\$residuals

cv.ridge\$residuals

dput(dat):

structure(list(X = 1:397, rank = structure(c(3L, 3L, 2L, 3L,
3L, 1L, 3L, 3L, 3L, 3L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 1L, 3L, 3L, 2L, 2L, 3L, 3L, 2L, 3L, 2L, 2L, 2L,
3L, 2L, 3L, 1L, 3L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L,
2L, 3L, 1L, 1L, 3L, 1L, 1L, 2L, 1L, 2L, 3L, 1L, 2L, 1L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 2L, 2L, 3L, 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 41L, 9L, 23L, 23L, 40L, 38L,
19L, 25L, 40L, 23L, 25L, 1L, 28L, 12L, 11L, 16L, 12L, 14L, 23L,
9L, 10L, 8L, 9L, 3L, 33L, 11L, 4L, 9L, 22L, 35L, 17L, 28L, 17L,
45L, 29L, 35L, 28L, 8L, 17L, 26L, 3L, 6L, 43L, 17L, 22L, 6L,
17L, 15L, 37L, 2L, 25L, 9L, 10L, 10L, 10L, 38L, 21L, 4L, 17L,
13L, 30L, 41L, 42L, 28L, 16L, 20L, 18L, 31L, 11L, 10L, 15L, 40L,
20L, 19L, 3L, 37L, 12L, 21L, 30L, 39L, 4L, 5L, 14L, 32L, 24L,
25L, 24L, 54L, 28L, 2L, 32L, 4L, 11L, 56L, 10L, 3L, 35L, 20L,
16L, 17L, 10L, 21L, 14L, 15L, 19L, 3L, 27L, 28L, 4L, 27L, 36L,
4L, 14L, 4L, 21L, 12L, 4L, 21L, 12L, 1L, 6L, 15L, 2L, 26L, 22L,
3L, 1L, 21L, 16L, 18L, 8L, 25L, 5L, 19L, 37L, 20L, 17L, 28L,
10L, 13L, 27L, 3L, 11L, 18L, 8L, 26L, 23L, 33L, 13L, 18L, 28L,
25L, 22L, 43L, 19L, 19L, 48L, 9L, 4L, 4L, 34L, 38L, 4L, 40L,
28L, 17L, 19L, 21L, 35L, 18L, 7L, 20L, 4L, 39L, 15L, 26L, 11L,
16L, 15L, 29L, 14L, 13L, 21L, 23L, 13L, 34L, 38L, 20L, 3L, 9L,
16L, 39L, 29L, 26L, 38L, 36L, 8L, 28L, 25L, 7L, 46L, 19L, 5L,
31L, 38L, 23L, 19L, 17L, 30L, 21L, 28L, 29L, 39L, 20L, 31L, 4L,
28L, 12L, 22L, 30L, 9L, 32L, 41L, 45L, 31L, 31L, 37L, 36L, 43L,
14L, 47L, 13L, 42L, 42L, 4L, 8L, 8L, 12L, 52L, 31L, 24L, 46L,
39L, 37L, 51L, 45L, 8L, 49L, 28L, 2L, 29L, 8L, 33L, 32L, 39L,
11L, 19L, 40L, 18L, 17L, 49L, 45L, 39L, 27L, 28L, 14L, 46L, 33L,
7L, 31L, 5L, 22L, 20L, 14L, 29L, 35L, 22L, 6L, 12L, 46L, 16L,
16L, 24L, 9L, 13L, 24L, 30L, 8L, 23L, 37L, 10L, 23L, 49L, 20L,
18L, 33L, 19L, 36L, 35L, 13L, 32L, 37L, 13L, 17L, 38L, 31L, 32L,
15L, 41L, 39L, 4L, 27L, 56L, 38L, 26L, 22L, 8L, 25L, 49L, 39L,
28L, 11L, 14L, 23L, 30L, 20L, 43L, 43L, 15L, 10L, 35L, 33L, 13L,
23L, 12L, 30L, 27L, 28L, 4L, 6L, 38L, 11L, 8L, 27L, 8L, 44L,
27L, 15L, 29L, 29L, 38L, 33L, 40L, 30L, 33L, 31L, 42L, 25L, 8L
), yrs.service = c(18L, 16L, 3L, 39L, 41L, 6L, 23L, 45L, 20L,
18L, 8L, 2L, 1L, 0L, 18L, 3L, 20L, 34L, 23L, 36L, 26L, 31L, 30L,
19L, 8L, 8L, 23L, 3L, 0L, 8L, 4L, 2L, 9L, 2L, 2L, 0L, 21L, 4L,
31L, 9L, 2L, 23L, 27L, 38L, 19L, 15L, 28L, 19L, 25L, 1L, 28L,
11L, 3L, 9L, 11L, 5L, 21L, 8L, 9L, 3L, 8L, 2L, 31L, 11L, 3L,
8L, 12L, 31L, 17L, 36L, 2L, 45L, 19L, 34L, 23L, 3L, 3L, 19L,
1L, 2L, 28L, 16L, 20L, 2L, 18L, 14L, 37L, 2L, 25L, 7L, 5L, 7L,
7L, 38L, 20L, 0L, 12L, 7L, 14L, 26L, 25L, 23L, 5L, 14L, 10L,
28L, 8L, 8L, 8L, 31L, 16L, 16L, 1L, 37L, 0L, 9L, 29L, 36L, 1L,
3L, 14L, 32L, 22L, 22L, 22L, 49L, 26L, 0L, 30L, 2L, 9L, 57L,
8L, 1L, 25L, 18L, 14L, 14L, 7L, 18L, 8L, 10L, 11L, 3L, 27L, 28L,
4L, 27L, 26L, 3L, 12L, 4L, 9L, 10L, 0L, 21L, 18L, 0L, 6L, 16L,
2L, 19L, 7L, 3L, 0L, 8L, 16L, 19L, 6L, 18L, 5L, 19L, 24L, 20L,
6L, 25L, 7L, 9L, 14L, 3L, 11L, 5L, 8L, 22L, 23L, 30L, 10L, 10L,
28L, 19L, 9L, 22L, 18L, 19L, 53L, 7L, 4L, 4L, 33L, 22L, 4L, 40L,
17L, 17L, 5L, 2L, 33L, 18L, 2L, 20L, 3L, 39L, 7L, 19L, 1L, 11L,
11L, 22L, 7L, 11L, 21L, 10L, 6L, 20L, 35L, 20L, 1L, 7L, 11L,
38L, 27L, 24L, 19L, 19L, 3L, 17L, 25L, 6L, 40L, 6L, 3L, 30L,
37L, 23L, 23L, 11L, 23L, 18L, 23L, 7L, 39L, 8L, 12L, 2L, 7L,
8L, 22L, 23L, 3L, 30L, 33L, 45L, 26L, 31L, 35L, 30L, 43L, 10L,
44L, 7L, 40L, 18L, 1L, 4L, 3L, 6L, 48L, 27L, 18L, 46L, 38L, 27L,
51L, 43L, 6L, 49L, 27L, 0L, 27L, 5L, 7L, 28L, 9L, 1L, 7L, 36L,
18L, 11L, 43L, 39L, 36L, 16L, 13L, 4L, 44L, 31L, 4L, 28L, 0L,
15L, 7L, 9L, 19L, 35L, 6L, 3L, 9L, 45L, 16L, 15L, 23L, 9L, 11L,
15L, 31L, 4L, 15L, 37L, 10L, 23L, 60L, 9L, 10L, 19L, 6L, 38L,
23L, 12L, 25L, 15L, 11L, 17L, 38L, 31L, 35L, 10L, 27L, 33L, 3L,
28L, 49L, 38L, 27L, 20L, 1L, 21L, 40L, 35L, 14L, 4L, 11L, 15L,
30L, 17L, 43L, 40L, 10L, 1L, 30L, 31L, 8L, 20L, 7L, 26L, 19L,
26L, 1L, 3L, 38L, 8L, 3L, 23L, 5L, 44L, 21L, 9L, 27L, 15L, 36L,
18L, 19L, 19L, 30L, 19L, 25L, 15L, 4L), sex = structure(c(2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 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2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), levels = c("Female",
"Male"), class = "factor"), salary = c(139750L, 173200L, 79750L,
115000L, 141500L, 97000L, 175000L, 147765L, 119250L, 129000L,
119800L, 79800L, 77700L, 78000L, 104800L, 117150L, 101000L, 103450L,
124750L, 137000L, 89565L, 102580L, 93904L, 113068L, 74830L, 106294L,
134885L, 82379L, 77000L, 118223L, 132261L, 79916L, 117256L, 80225L,
80225L, 77000L, 155750L, 86373L, 125196L, 100938L, 146500L, 93418L,
101299L, 231545L, 94384L, 114778L, 98193L, 151768L, 140096L,
70768L, 126621L, 108875L, 74692L, 106639L, 103760L, 83900L, 117704L,
90215L, 100135L, 75044L, 90304L, 75243L, 109785L, 103613L, 68404L,
100522L, 101000L, 99418L, 111512L, 91412L, 126320L, 146856L,
100131L, 92391L, 113398L, 73266L, 150480L, 193000L, 86100L, 84240L,
150743L, 135585L, 144640L, 88825L, 122960L, 132825L, 152708L,
88400L, 172272L, 107008L, 97032L, 105128L, 105631L, 166024L,
123683L, 84000L, 95611L, 129676L, 102235L, 106689L, 133217L,
126933L, 153303L, 127512L, 83850L, 113543L, 82099L, 82600L, 81500L,
131205L, 112429L, 82100L, 72500L, 104279L, 105000L, 120806L,
148500L, 117515L, 72500L, 73500L, 115313L, 124309L, 97262L, 62884L,
96614L, 78162L, 155500L, 72500L, 113278L, 73000L, 83001L, 76840L,
77500L, 72500L, 168635L, 136000L, 108262L, 105668L, 73877L, 152664L,
100102L, 81500L, 106608L, 89942L, 112696L, 119015L, 92000L, 156938L,
144651L, 95079L, 128148L, 92000L, 111168L, 103994L, 92000L, 118971L,
113341L, 88000L, 95408L, 137167L, 89516L, 176500L, 98510L, 89942L,
88795L, 105890L, 167284L, 130664L, 101210L, 181257L, 91227L,
151575L, 93164L, 134185L, 105000L, 111751L, 95436L, 100944L,
147349L, 92000L, 142467L, 141136L, 100000L, 150000L, 101000L,
134000L, 103750L, 107500L, 106300L, 153750L, 180000L, 133700L,
122100L, 86250L, 90000L, 113600L, 92700L, 92000L, 189409L, 114500L,
92700L, 119700L, 160400L, 152500L, 165000L, 96545L, 162200L,
120000L, 91300L, 163200L, 91000L, 111350L, 128400L, 126200L,
118700L, 145350L, 146000L, 105350L, 109650L, 119500L, 170000L,
145200L, 107150L, 129600L, 87800L, 122400L, 63900L, 70000L, 88175L,
133900L, 91000L, 73300L, 148750L, 117555L, 69700L, 81700L, 114000L,
63100L, 77202L, 96200L, 69200L, 122875L, 102600L, 108200L, 84273L,
90450L, 91100L, 101100L, 128800L, 204000L, 109000L, 102000L,
132000L, 77500L, 116450L, 83000L, 140300L, 74000L, 73800L, 92550L,
88600L, 107550L, 121200L, 126000L, 99000L, 134800L, 143940L,
104350L, 89650L, 103700L, 143250L, 194800L, 73000L, 74000L, 78500L,
93000L, 107200L, 163200L, 107100L, 100600L, 136500L, 103600L,
57800L, 155865L, 88650L, 81800L, 115800L, 85000L, 150500L, 74000L,
174500L, 168500L, 183800L, 104800L, 107300L, 97150L, 126300L,
148800L, 72300L, 70700L, 88600L, 127100L, 170500L, 105260L, 144050L,
111350L, 74500L, 122500L, 74000L, 166800L, 92050L, 108100L, 94350L,
100351L, 146800L, 84716L, 71065L, 67559L, 134550L, 135027L, 104428L,
95642L, 126431L, 161101L, 162221L, 84500L, 124714L, 151650L,
99247L, 134778L, 192253L, 116518L, 105450L, 145098L, 104542L,
151445L, 98053L, 145000L, 128464L, 137317L, 106231L, 124312L,
114596L, 162150L, 150376L, 107986L, 142023L, 128250L, 80139L,
144309L, 186960L, 93519L, 142500L, 138000L, 83600L, 145028L,
88709L, 107309L, 109954L, 78785L, 121946L, 109646L, 138771L,
81285L, 205500L, 101036L, 115435L, 108413L, 131950L, 134690L,
78182L, 110515L, 109707L, 136660L, 103275L, 103649L, 74856L,
77081L, 150680L, 104121L, 75996L, 172505L, 86895L, 105000L, 125192L,
114330L, 139219L, 109305L, 119450L, 186023L, 166605L, 151292L,
103106L, 150564L, 101738L, 95329L, 81035L)), row.names = c(NA,
-397L), class = "data.frame")

These objects have no portion named `residuals`

cv.lasso\$FOO
#> NULL

# run these to see

str(cv.lasso)
str(cv.ridge)

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.