similar to: error using predict() / "fRegression"-package

Displaying 20 results from an estimated 100 matches similar to: "error using predict() / "fRegression"-package"

2009 Oct 08
0
predict.lm() out-of-sample predictions - problem with data classes
Hello! I'm still working on my problem, which also occurs with the predict.lm() function. - Providing newdata, which is a data.frame with all variables being "numeric", as str() shows, R tells me the following: ar1.xpred.test.pred <- predict(ar1.xpred.fitted, regdata.test, se.fit = FALSE) Fehler: variable 'lag(ret1)' was fitted with type "numeric" but type
2008 Nov 19
1
mle2 simple question - sigma?
I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(RegData)<-c("x", "y") linregfun = function(a,b,sigma) { Y.pred = a+b*x
2015 Dec 14
2
Tablegen definition question
Hi, That's what the DecoderMethod is for. Similarly ParserMatchClass for the asm parser and PrintMethod for the asm printer: def CondCodeOperand : AsmOperandClass { let Name = "CondCode"; } def pred : PredicateOperand<OtherVT, (ops i32imm, i32imm), (ops (i32 14), (i32 zero_reg))> { let PrintMethod = "printPredicateOperand";
2013 Nov 05
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
The device name prefix for IDE hard drives used to be `ad' but now is `ada' (http://www.freebsd.org/doc/handbook/disks-naming.html). For virtio hard drives it is `vtbd'. Under an MBR partition table a slice will be used, so the name of the first partitions will be either `ada0s1a' or `vtbd0s1a'. Under a GPT partition table, where no slice is needed, the name of the first
2013 Nov 03
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
The device name prefix for IDE hard drives used to be `ad' but now is `ada' (http://www.freebsd.org/doc/handbook/disks-naming.html). For virtio hard drives it is `vtbd'. Under an mbr partition table a slice will be used, so the name of the first partitions will be either ada0s1a or vtbd0s1a. Under a GPT partition table, where no slice is needed, the name of the first partition will be
2008 May 22
1
How to account for autoregressive terms?
Hi, how to estimate a the following model in R: y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3) 1) using "lm" : dates &lt;- as.Date(data.df[,1]) selection&lt;-which(dates&gt;=as.Date("1986-1-1") &amp; dates&lt;=as.Date("2007-12-31")) dep &lt;- ts(data.df[selection,c("dep")]) indep.ret1
2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of changes between this and previous versions, and some of the code I've been using with earlier versions (e.g. 3.0.2) no longer work. Here is a simple illustration of a problem I'm having with xpred.rpart. iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4], parms=list(prior=c(0.5,0.25, 0.25))) + ) >
2009 Jul 14
2
Proper Paste for Data Member
I imported a spreadsheet into a variable sh e.g. sh$aaaa, sh$bbbb, etc... doing the following: tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... ) fails. The paste isn't evaluating properly. What is the proper way to concatenate a data source with a member name such that they evaluate properly. actual code below: doEnv <-
2008 Oct 01
0
xpred.rpart() in library(mvpart)
R-users E-mail: r-help@r-project.org Hi! R-users. http://finzi.psych.upenn.edu/R/library/mvpart/html/xpred.rpart.html says: data(car.test.frame) fit <- rpart(Mileage ~ Weight, car.test.frame) xmat <- xpred.rpart(fit) xerr <- (xmat - car.test.frame$Mileage)^2 apply(xerr, 2, sum) # cross-validated error estimate # approx same result as rel. error from printcp(fit) apply(xerr, 2,
2015 Dec 14
2
Tablegen definition question
Hello James, that was also what I've planned to do but just wasn't sure. Thanks for that. On Mon, Dec 14, 2015 at 11:52 AM, James Molloy <james at jamesmolloy.co.uk> wrote: > Hi, > > You can't nest operands like that - it must be a flattened list. So: > > def *Xpred* : PredicateOperand<OtherVT, (ops *i32imm, i32imm*, i32imm), > (ops (i32 14), (i32
2015 Dec 14
2
Tablegen definition question
Hi All, In ARMInstFormats.td predicate is defined this way: *def pred : PredicateOperand<OtherVT, (ops i32imm, i32imm),* *(ops (i32 14), (i32 zero_reg))> {...}* I use the same definition in my code. But I have another version of predicate which is exactly the same but it is a condition code plus a quantifier! (e.g. Xpred = (pred + i32imm)). I was wondering how we can define a sub sub
2009 Jun 09
3
rpart - the xval argument in rpart.control and in xpred.rpart
Dear R users, I'm working with the rpart package and want to evaluate the performance of user defined split functions. I have some problems in understanding the meaning of the xval argument in the two functions rpart.control and xpred.rpart. In the former it is defined as the number of cross-validations while in the latter it is defined as the number of cross-validation groups. If I am
2009 May 26
0
cross-validation in rpart
Dear R users, I know cross-validation does not work in rpart with user defined split functions. As Terry Therneau suggested, one can use the xpred.rpart function and then summarize the matrix of the predicted values into a single "goodness" value. I need only a confirmation: set for example xval=10, if I correctly understood a single column of the matrix obatined by xpred.rpart gives
2010 Jan 13
1
Rollapply
Hi I would like to understand how to extend the function (FUN) I am using in rollapply below. ###################################### With the following simplified data, test1 yields parameters for a rolling regression data = data.frame(Xvar=c(70.67,70.54,69.87,69.51,70.69,72.66,72.65,73.36), Yvar =c(78.01,77.07,77.35,76.72,77.49,78.70,77.78,79.58)) data.z = zoo(d) test1 =
2005 Jan 25
0
Estimating error rate for a classification tree
Hi, I created an rpart object and pruned the tree using 1-SE rule. I used 10-fold cross validation while creating the tree. Then, I extracted the cross-validated predictions for my data points using xpred.rpart and obtained some statistics like precision, recall, overall error rate, etc. However, these values change each time I run xpred.rpart because of the random shuffling going on before
2007 Feb 26
2
survival analysis using rpart
Hello, I use rpart to predict survival time and have a problem in interpreting the output of ?estimated rate?. Here is an example of what I do: > stagec <- > read.table("http://www.stanford.edu/class/stats202/DATA/stagec.data", > col.names=c("pgtime", "pgstat", "age","eet", "g2", "grade", "gleason", >
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
Because of previous automated commits, such as changing 'guestfs___' -> 'guestfs_int_', several function calls no longer lined up with their parameters, and some lines were too long. The bulk of this commit was done using emacs batch mode and the technique described here: http://www.cslab.pepperdine.edu/warford/BatchIndentationEmacs.html The changes suggested by emacs were
2005 Jun 20
0
[patch 1/3] fs/ext3/super.c: fix sparse warnings
An embedded and charset-unspecified text was scrubbed... Name: sparse-fs_ext3_super.patch URL: <http://listman.redhat.com/archives/ext3-users/attachments/20050620/af49961a/attachment.ksh>
2012 Jan 28
0
Graph Titles
Hard to help without a short example dataset (please read posting guide!) posted with dput(). You likely want to "paste" together a title for your graph. see ?paste Rambler1 wrote > > Another simple question that is driving me crazy: > I have a for loop that loops through a matrix and pulls data from two > different variables, computes differences and runs a regression
2016 May 26
2
Error en subset selection
Hola a todas, Quiero realizar un subset selection usando el paquete leaps, entre mis variables explicativas tengo rezagos de las mismas, por tanto tienen datos NA. sin embargo, al tratar de realizar cross validation me pide que los datos esten en formato data.frame con lo que me arroja un error al ejecutar el algoritmo. Mi pregunta es cómo puedo forzar en un data.frame en que tengo variables