Questions tagged [predict]

Prediction of values based on model objects.

Predictive models are statistical or algorithmic models for use in prediction tasks. These tend to arise in data-intensive contexts, hence there is a strong association with statistics and machine learning.

Tag Usage

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

1574 questions
0
votes
1 answer

Making predictions from a coxph model

I am having difficulty making predictions using coxph. I wish to learn a Cox PH model on in-sample data and then use the parameters derived on out of sample data as follows: # learn IS params model.PH <- coxph(Surv(days.IS, outcome.IS) ~…
0
votes
1 answer

Debugging Code that uses predict() in R

When running this code: predict(rfm, x[split.idx[[i]], sig_otu], type="prob") I get this error message: Error in x[, vname, drop = FALSE] : subscript out of bounds Does this error message arise from incorrect bracketing? I've tried re-arranging…
Brian Lee
  • 39
  • 7
0
votes
1 answer

Setting row.names as variable after predict.lm in R

I am running a predict.lm on a test set of data. Not every oberservation is getting an outputted result. When I run my predict code I get the following results predict(lm(Q2 ~ Q1 + Q3A + Q3B + Q3C + Q3D + Q3E + Q3H + Q5_2C + Q5_2E + Q9A + Q9B + Q9E…
0
votes
1 answer

Why KMeansModel.predict error has started to appear since Spark 1.0.1.?

I work with Scala (2.10.4 version) and Spark - I have moved to Spark 1.0.1. version and noticed one of my scripts is not working correctly now. It uses k-means method from the MLlib library in the following manner. Assume I have a KMeansModel…
Marta Karas
  • 4,967
  • 10
  • 47
  • 77
0
votes
1 answer

Identical quadratic and cubic predictions

For the following data: require(dplyr) require(ggplot2) ds <- read.table(header = TRUE, text =" obs id year attend 1 47 2000 1 2 47 2001 3 3 47 2002 5 4 47…
andrey
  • 2,029
  • 2
  • 18
  • 23
0
votes
0 answers

Emacs Predictive - Accept with punctuation

I have successfully managed to install the predictive package for Emacs and am trying to accept the most likely correction with punctuation, which is mentioned in the…
0
votes
1 answer

How to obtain prediction intervals for linear regression in R

This question probably stems from the fact that I don't fully understand what the predict() function is doing, but I'm wondering if there is a way to access the underlying prediction data so that I can get prediction intervals for a given unobserved…
Marc Tulla
  • 1,751
  • 2
  • 20
  • 34
0
votes
2 answers

predict function in betategarch package gives error subscript out of bounds

I am using betategarch package and when I use predict function it gives me error subscript out of bounds. I have researched it and did not get any results so far because this error is very general and I am not sure what to do and how to solve it. I…
Serdar
  • 87
  • 1
  • 1
  • 6
0
votes
1 answer

Stata Predict GARCH

I want to do something very easy, but it doesnt work! I need to see the predictions (and errors) of a GARCH model. The Main Variable es "dowclose", and my idea is look if the GARCH model has a good fitting on this variable. Im using this easy code,…
0
votes
1 answer

Issue with predict function in R for one biostack and not another

I am doing species distribution modeling (ecological niche modeling) where I project a model to either current or future climate rasters (Bioclim variables). When I predict to the current rasters (object=bio_stack), everything works, using this…
user3545679
  • 181
  • 1
  • 12
0
votes
1 answer

Generate a regression plane with predict function

I want to plot a regression plane for my data: structure(list(L = c(96.4155, 76.803, 71.5615, 68.193, 65.6975, 74.627, 67.82, 64.26, 62.06, 60.35, 68.284, 63.7, 61.04, 59.05, 57.56, 64.2695, 60.69, 58.47, 56.78, 55.42, 61.3715, 58.27, 56.42,…
haPpy85
  • 1
  • 1
0
votes
1 answer

loess.smooth, smooth.splines and sm.regression with more x variables

I'd like to predict a y with several x values (x1, x2, x3, x4, x5, x6). A linear model is very simple, but i don't understand how can i use loess.smooth, smooth.splines and sm.regression with more x variables. I tried using a dataset or a matrix as…
As As
  • 2,049
  • 4
  • 17
  • 33
0
votes
1 answer

R predict function not using entire data in the test data set, only using partial data and predicting

I have a train data set which has 700 records. I prepared the model using c5.0 function with this data. library(C50) abc_model <- C5.0(abc_train[-5], abc_train$resultval) I have test data, which has 5000 records. I am using predict function to do…
user3473975
  • 1
  • 1
  • 3
0
votes
1 answer

Using spline model in Raster Predict

I have a question about Raster.Predict in R. Is it possible to use a spline model to generate a new raster using raster predict? I have a set of data for which I would like to fit a spline model, fitting temperature to depth, then apply that spline…
Trevor
  • 1
0
votes
1 answer

How to predict using glm in R?

So I have a glm that is defined like this oring.glm = glm(oring.data$Damaged ~ oring.data$Temp, data = oring.data, family=binomial) The data looks like this Oring Temp 1 15 0 20 1 30 I want to predict what happens to the…
praks5432
  • 7,246
  • 32
  • 91
  • 156
1 2 3
99
100