Re: [R] Problem with predict?

2012-06-20 Thread Peter Ehlers
On 2012-06-20 08:56, Petr PIKAL wrote: Hi Hello, I am trying to fit a model to some "death over time" data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and calcu

Re: [R] Problem with predict?

2012-06-20 Thread Petr PIKAL
Hi > > Hello, > > I am trying to fit a model to some "death over time" data that does not > fit the criteria for the usual LD50 type models (the counts are too > large). I am using a simple linear model in an attempt to plot a nice line > on a scatter plot and calculate some LD values to use

[R] Problem with predict?

2012-06-20 Thread Julie Truman
Hello, I am trying to fit a model to some "death over time" data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and calculate some LD values to use in designing an exp

Re: [R] Problem with predict and lines in plotting binomial glm

2011-09-21 Thread Eik Vettorazzi
Hi Anina, predict.glm returns predicted probabilities, when used with type="response", so you have to either scale the probs to the number of trials for any x or you plot probs from start: par(mfcol=c(1,2)) plot(x, successes) lines(x, (successes+failures)*predict(glm1, type= "response"), lwd=2) pl

[R] Problem with predict and lines in plotting binomial glm

2011-09-21 Thread Heystek, A, Me <15418...@sun.ac.za>
Problems with predict and lines in plotting binomial glm Dear R-helpers I have found quite a lot of tips on how to work with glm through this mailing list, but still have a problem that I can't solve. I have got a data set of which the x-variable is count data and the y-variable is proportional

Re: [R] problem with 'predict'

2011-07-12 Thread Meesters, Christian
> > flags <- c(rep(1, length(patient_indices)), rep(0, > > length(control_indices))) > > # dataset is a data.frame and param the parameter to be analysed: > > data1 <- dataset[,param][c(patient_indices, control_indices)] > > fit1 <- glm(flags ~ data1, family = binomial) > > new.data<- seq(0, 3

Re: [R] problem with 'predict'

2011-07-11 Thread David Winsemius
On Jul 11, 2011, at 11:51 AM, Meesters, Christian wrote: Hi, I would like to tabulate the likelihood for an affection. For this, I retrieve indices of affected people and controls for my data set and proceed as follows: flags <- c(rep(1, length(patient_indices)), rep(0, length(control_

Re: [R] problem with 'predict'

2011-07-11 Thread Dennis Murphy
Hi: The data frame you submit as newdata = to predict() has to have the same variables as the right hand side of the model formula. For example, if the model has covariates x1, x2, x3, then the data frame you create as the newdata has to consist of columns named x1, x2, x3. Another problem is that

[R] problem with 'predict'

2011-07-11 Thread Meesters, Christian
Hi, I would like to tabulate the likelihood for an affection. For this, I retrieve indices of affected people and controls for my data set and proceed as follows: flags <- c(rep(1, length(patient_indices)), rep(0, length(control_indices))) # dataset is a data.frame and param the parameter to be

Re: [R] problem with predict(mboost,...)

2010-10-20 Thread Benjamin Hofner
ing on the type of your outcome). Please consult literatur on generalized linear models (GLMs) for further help. Hope that helps Benjamin On 20.10.2010 12:00, r-help-requ...@r-project.org wrote: Message: 129 Date: Wed, 20 Oct 2010 11:08:44 +0200 From: H?ring, Tim (LWF) To: Subject: [R] probl

[R] problem with predict(mboost,...)

2010-10-20 Thread LWF
Hi, I use a mboost model to predict my dependent variable on new data. I get the following warning message: In bs(mf[[i]], knots = args$knots[[i]]$knots, degree = args$degree, : some 'x' values beyond boundary knots may cause ill-conditioned bases The new predicted values are partly negative

[R] Problem with predict() and factors

2009-12-03 Thread Idgarad
I am working on a script that takes numeric performance indicators and runs them against a series of regressors (dummy regressors, yes\no stuff via 0 and 1, e.g. Was is Christmas this week 0=no, 1=yes). The script is as follows (Written as a function): -- Begin Script -- doEnv <- function(HOUR,

[R] problem with predict from nnet package

2009-11-20 Thread Mauricio Romero
Hi, I’m having mayor issues with predict from the nnet package. I’m training a neural network for forecasting. I trained the network with info from 1995 to 2009 and I want to forecast month by month 2010.(the network forecasts one month at a time). Since I have to do iterative forecasting

[R] problem with predict(...,type="terms")

2009-08-03 Thread Antonio.Gasparrini
Hello R users, I'm trying to understand the meaning of the results returned by the command 'predict' with type="terms". I thought it was the matrix with the fitted values for each term (value of predictor * related coef), but the calculation is different. I include an example below: y <- rnor