1,596 questions
0 votes
1 answer
82 views
How to obtain predicted probabilities from a binomial GLMM?
I am modelling the probability of species presence based on environmental variables. My dataset contains both real presence data and pseudo-absence (randomly generated absence) data. My environmental ...
0 votes
1 answer
69 views
Why does `predict` not work for `lme4::lmer` when NA are present
I found related questions here ( 1 (where I made a reference to this question), 2, 3 ) but I can't figure out how I can really solve this problem within lme4. Because of an early error cholmod-factor ...
2 votes
1 answer
76 views
How to bootstrap confidence intervals for predicted probabilities of a glm? [closed]
I am following the Maturity Schedules fishR Vignette by Dr Derek Ogle (https://derekogle.com/fishR/examples/oldFishRVignettes/Maturity.pdf) to generate stock assessments. Following the code and ...
2 votes
1 answer
62 views
R: predict.glm for a logistic input produces a linear model [duplicate]
I've got a bit of a headscratcher from what I thought was going to be a routine fit. The logistic regression model I fit through the glm function instead gives a linear model when I use the predict ...
0 votes
1 answer
66 views
Terra predict function failing to predict my random forest model
I have a csv. with my data and I put it through a RF to predict sediment type based off of bathymetry data from 24 sample points (and get sediment distribution as an image output), the RF is working ...
0 votes
0 answers
126 views
How to gather predictions aligned with dataset from lightning trainer.predict?
When we use lightning in multigpu setting with strategy ddp, predictions = trainer.predict(model, dataloaders=predict_dataloader) the predictions are from a single gpu. From Combining loss, ...
0 votes
1 answer
60 views
Error when trying to predict using a cosinor.lm() model
I am trying to apply a model obtained from the cosinor::cosinor.lm() function to predict values of a dummy dataset by using the predict() function. However, when I run the predict() function, I ...
0 votes
1 answer
47 views
Error predicting with REEMtree model: Number of observations in newdata does not match group identifiers
I am using the REEMtree package in R to build a tree with random effects, but when I attempt to make predictions on the test data, I encounter the following error: Error in predict.REEMtree(...
0 votes
0 answers
24 views
Interpolating daily persistence probabilities in package carcass
Disclaimer: I am new to R and survival analyses so apologies if I don't use the right terms or coding etiquette-figuring it out. In the carcass package, I've used function persistence.prob to develop ...
0 votes
1 answer
33 views
predict.svm ignoring new dfm object as x
I am trying to run svm (from e1071 package) on a document-feature matrix produced by the package quanteda. I start by training the svm on training data: svm_fit <- svm(x=dfm_train, y=as.factor(...
1 vote
3 answers
166 views
Deploying Keras model for prediction in Google Cloud Functions
I've been trying to deploy a very simple toy Keras model to Cloud Functions, which would predict the class of an image, but for reasons unknown, when the execution gets to the predict method, it gets ...
0 votes
0 answers
25 views
How to ensemble list of nn object from result of parallelly and neuralnet
I'm creating a backpropagation neural network in R using neural net The data I use are montly u and v wind, sea surface, relative humidity data from era5 in netcdf (.nc) format to predict monthly ...
1 vote
1 answer
47 views
Why do scikit-learn predict(X) methods accept a 2D matrix rather than a 1D vector?
Does anyone know why the predict(X) methods of scikit-learn classifiers and regressors expect input X to be a 2D array (matrix) rather than a 1D array (vector)? I'm just curious about the history of ...
1 vote
1 answer
87 views
How to use parameter term names in avg_predictions() or hypotheses() functions?
I am attempting to estimate the difference in predicted probabilities between groups using the avg_predictions() function and the hypothesis argument from the powerful marginaleffects package. However,...
1 vote
0 answers
30 views
I keep getting this 'object not found' error. How do I fix it?
trying to use predict function to find ValueScore (vs in my chart) using different independent variables and a regression. encountered an error I cannot get passed. sales <- read.csv("...