similar to: predict (PR#2685)

Displaying 20 results from an estimated 900 matches similar to: "predict (PR#2685)"

2003 Mar 26
5
predict (PR#2686)
# r-bugs@r-project.org `predict' complains about new factor levels, even if the "new" levels are merely levels in the original that didn't occur in the original fit and were sensibly dropped, and that don't occur in the prediction data either. (At least if `drop.unused.levels' was set to TRUE, which the default.) test> scrunge.data.2_ data.frame( y=runif( 3),
2009 Oct 30
1
parse_Rd and/or lazyload problem
I'm encountering problems when making lazy-loadable databases of the output from 'parse_Rd'. The lazy-load database is of seemingly limitless size when I try to reload it... Admittedly I am using functions that I'm not really supposed to use, which is why this isn't a bug report, but there does seem to be something strange going on; my code is very similar to code that lives
2019 Oct 04
0
Error in [.terms
Martin, ? There are a couple of issues with [.terms that have bitten my survival code.? At the useR conference I promised you a detailed (readable) explanation, and have been lax in getting it to you. The error was first pointed out in a bugzilla note from 2016, by the way.? The current survival code works around these. Consider the following formula: <<testform>>=
2016 Dec 12
2
why does parent.frame() cycle when called from inside capture.output()?
Hello R devel/help, I ran into this strange behavior: # showstack is supposed to walk through the stack of parent # environments when it is called: showstack = function() { env = environment() for(i in 1:12) { env = do.call(parent.frame, list(), env=env) print(env) } } # a simple chain of functions: g3=function(t) showstack()
2016 Dec 12
2
why does parent.frame() cycle when called from inside capture.output()?
Hello R devel/help, I ran into this strange behavior: # showstack is supposed to walk through the stack of parent # environments when it is called: showstack = function() { env = environment() for(i in 1:12) { env = do.call(parent.frame, list(), env=env) print(env) } } # a simple chain of functions: g3=function(t) showstack()
2009 Mar 10
1
suggestion/request: install.packages and unnecessary file modifications
Dear R-devel When 'install.packages' runs, it updates all html files in all packages. Mostly, there seems to be no actual change to the html file contents, but the date/time does change. This has causing been me a bit of trouble, because I keep synchronized versions of R on several different machines, and whenever I install a package, many MB of file transfers are required; my slow upload
2018 Mar 20
0
Struggling to compute marginal effects !
In that case, I can't work out why the first model fails but not the second. I would start looking at "Data" to see what it contains. if: object2 <- polr(Inc ~ Training ,Data,Hess = T,method = "logistic" ) works, the problem may be with the "Adopt" variable. Jim On Tue, Mar 20, 2018 at 10:55 AM, Willy Byamungu <wmulimbi at email.uark.edu> wrote: >
2005 Feb 11
3
getAnywhere and functions starting with "." (PR#7684)
Full_Name: Mark Bravington Version: 2.0.1 OS: Windows XP Submission from: (NULL) (140.79.22.104) 'getAnywhere' crashes when its argument starts with a period: > getAnywhere( '.onLoad') Error in exists(x, envir, mode, inherits) : invalid first argument One fix might be to replace the line if ( !is.null(f <- getS3method(gen, cl, TRUE))) { with if ( nchar( gen)
2012 Jan 05
1
delete.response leaves response in attribute dataClasses
I posted this one as an R bug (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14767), but Prof. Ripley says I'm premature, and I should raise the question here. Here's the behavior I assert is a bug: The output from delete.response on a terms object alters the formula by removing the dependent variable. It removes the response from the "variables" attribute and it changes
2012 Jun 05
1
model.frame and predvars
I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm does not. I use a call to model.frame in predict.coxph, which is why I went that route, but never noted the difference till now (preparing for my course in Nashville). Could someone shed light
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the "simex" package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ... Can someone suggest how to go about doing this? I can extract the
2002 Sep 19
3
savehistory directories and quitting R (PR#2038)
# # r-bugs@r-project.org # ###################################################### Because I work in different directories, but always want to save my .Rhistory in the same place, I have changed the system function savehistory to this: function (file = "D:/R50/.Rhistory") invisible(.Internal(savehistory(file))) When I use q() to quit R, and it asks me whether I want to
2005 Mar 11
3
delay() has been deprecated for 2.1.0
After a bunch of discussion in the core group, we have decided to deprecate the delay() function (which was introduced as "experimental" in R 0.50). This is the function that duplicates in R code the delayed evaluation mechanism (the promise) that's used in evaluating function arguments. The problem with delay() was that it was handled inconsistently (e.g. sometimes you would see
2018 Mar 19
4
Struggling to compute marginal effects !
Dear Oscar, and any other R-project person, Can you please help me to figure out the meaning of the following error message in red ? Error in eval(predvars, data, env) : numeric 'envir' arg not of length one I computed ordered logit models using 'polr' in R (I just followed the guidance a handout I found on princeton.edu about logit, probit and multinomial logit models) . The
2007 Jan 02
4
Am I missing something about debugging?
I would like to be able to trace execution into calls below the current function, or to follow execution as calls return. This is roughly the distinction between "step" and "next" in many debuggers. I would also like to be able to switch to a location further up the call stack than the location at which I enter the debugger, to see the context of the current operations. Are
2009 Jul 29
3
predict
I have found a regression model, and i would like to predict value in different points. I have tried to use predict function but it doesn't work. I have used predict function like this: newdata<-seq(from=0.1, to=0.32,by=0.02) data<-predict(fm,newdata) where fm is a regression model. The predict function return me that: Error in eval(predvars, data, env) : numeric argument
2017 Aug 05
2
Ussing assign
Hi there, Imagine I want to use a variable created with assign,but automatically. I have an issue with that. What I do is: #create in a loop the variables for(i in 1:5){ assign(paste0("variable",i),data.frame(x=rnorm(100),y=rnorm(100)) } Now, if I want to do create the five models, I do not know how to set this created data.frames I have tried: for (i in 1:5){
2010 Jul 21
2
Variance of the prediction in the linear regression model (Theory and programming)
Hi, folks, Here are the codes: ############## y=1:10 x=c(1:9,1) lin=lm(log(y)~x) ### log(y) is following Normal distribution x=5:14 prediction=predict(lin,newdata=x) ##prediction=predict(lin) ############### 1. The codes do not work, and give the error message: Error in eval(predvars, data, env) : numeric 'envir' arg not of length one. But if I use the code after the pound sign, it
2018 Aug 05
2
MASS::boxcox "object not found"
Hi there, I wrote a function that wraps MASS::boxcox as: bc <- function(vec) { lam <- boxcox(lm(vec ~ 1)) lam <- lam$x[which.max(lam$y)] (vec^lam - 1)/lam } When I invoke it as: > x <- runif(20) > bc(x) Error in eval(predvars, data, env) : object 'vec' not found I have googled, and rewrote the above function as: bc <- function(vec) { dat <<-
2018 Aug 05
2
MASS::boxcox "object not found"
Hi there, I wrote a function that wraps MASS::boxcox as: bc <- function(vec) { lam <- boxcox(lm(vec ~ 1)) lam <- lam$x[which.max(lam$y)] (vec^lam - 1)/lam } When I invoke it as: > x <- runif(20) > bc(x) Error in eval(predvars, data, env) : object 'vec' not found I have googled, and rewrote the above function as: bc <- function(vec) { dat <<-