Hi Andrew,

Thanks for sending me the reprex. I was able to figure out the error. The VIF values are estimated by regressing each predictor on all other predictors and then calculating the VIF as 1 / (1 – R2) for the regression and repeating for the remaining predictors. The algorithm starts by finding the predictor with the highest VIF value, removing it, and repeating the process until all VIF values are below the threshold. In your case, you have a dataset with 80 predictors and 20 observations, so the algorithm is unable to start for the same reason that you cannot fit a regression of all predictors against a single response. You do not have enough observations or degrees of freedom to estimate a VIF value. I would suggest finding another feature selection method. The VIF selection method will not work until you have fewer predictors than observations. Hope that helps.

Marcus

]]>You can use the plotnet function from the NeuralNetTools package:

library(NeuralNetTools) mod.in<-c(13.12,1.49,0.16,-0.11,-0.19,-0.16,0.56,-0.52,0.81) struct<-c(2,2,1) #two inputs, two hidden, one output plotnet(mod.in,struct=struct)]]>

big thanks for sharing.

I have the same issue as some above: Error in if (vif_max < thresh) { : missing value where TRUE/FALSE needed

I have 80 predictor variables with a high degree of multicollinearity such that an lm() call gives 61 undefined coefficients because of singularities.

I see you have not been able to duplicate the error, so here are my code and data: https://www.dropbox.com/sh/mbjtmklk8njqrs6/AADt3L9iNe0xyRKc-6jMFtusa?dl=0

Cheers,

Andrew. ]]>

mod.in<-c(13.12,1.49,0.16,-0.11,-0.19,-0.16,0.56,-0.52,0.81)

struct<-c(2,2,1) #two inputs, two hidden, one output

plot.nnet(mod.in,struct=struct) ]]>

Thank you!

]]>Hi Em,

You can suppress the points using a negative value for size (or alpha = 0). Something like this could work.

library(ggord) library(patchwork) # principal components analysis with the iris data set ord <- prcomp(iris[, 1:4]) p1 <- ggord(ord, iris$Species, arrow = NULL, txt = NULL) p2 <- ggord(ord, ellipse = F, size = -1) p1 + p2 + plot_layout(ncol = 1)]]>

I’ve also tried the parse function to see if I could add space to the species text, but I get the error message : Error in parse(text = str) : :1:5: unexpected symbol

1: 16:2n6

^

Hi Joaquin, please use the functions in the NeuralNetTools package. They are more current than the functions in my blog. Check out the publication for more info: https://www.jstatsoft.org/article/view/v085i11

]]>script<-getURL(raw.fun, ssl.verifypeer = FALSE)

Error in function (type, msg, asError = TRUE) :

error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

In addition, we can fine the funtion plot.nnet, we use de many libraries (NeuralNetTools, gamlss.add, and nnet) but not run. Cuuld you help me?

]]>