similar to: How to make array of regression objects

Displaying 20 results from an estimated 300 matches similar to: "How to make array of regression objects"

2011 Mar 04
2
How to copy data from data.frame to matrix
Hello I'm a new in R I have a large data.frame "s" (this is actualy just a table in mysql) : > names(s) [1] "symbols", "day", "value" I need to convert it to simple matrix. I have define this matrix like this: > data.matrix <- matrix(nrow=nDays, ncol=nSymbols, dimnames=list(days, symbols)) then i just copy values to the matrix using for()
2011 May 07
2
MDAC problems after last Wine path
Hello all. I'm using Fedora 14. I have patched my wine yesterday using yum, ane my wine current version is: 1.3.18-1.fc14. After that, some of my programs stop to working. It seems, what something happen with MDAC component, because program can't open mdb file and can not found MDAC component from the console. The errors. what i get: err:ole:CoGetClassObject class
2010 Jun 29
2
Matrix operations
Hello I have a quick question. I need to compute matrix in R, like A <- t(X) %*% solve(V) %*% X, where X is a vector and V is a matrix This code works, but now i want to optimize it. I have try: A <- crossprod(X, solve(V)) %*% X Is there another, better way? WBR Dima [[alternative HTML version deleted]]
2010 Apr 27
2
How to work out 3-way probabilities
Hello. I have a quick question. I try to use logit regression, to work out probabilities in the sport event. I have work out probabilities for group of 2 players: p1 - probability, what player1 will beat player2 p2 - probability, what player2 will beat player1 pt - tie probability, p1 <- 1 - p1 - p2; Now i want to work out probabilities for group of 3 players, like: pg1 - probability, what
2012 May 29
2
Use variable inside Function for updating the matrix
Hi, Here i have a data frame like this, frame name is "dat" *NAME AGE ELIGIBLE* A 20 B 14 C 35 D 10 E 50 In this, i want to change the column '*ELIGIBLE*' status to '*YES*' If, AGE between 18 to 35 Which means that, i should get a put like
2007 Aug 01
1
Problem to remove loops in a routine
Dear R-users, I have written the following code to generate some trellis plots. It works perfectly fine except that it is quite slow when it is apply to my typical datasets (over several thousands of lines). I believe the problem comes from the loops I am using to subset my data.frame. I read in the archives that the tapply function is often more efficient than a loop in R. Unfortunately ,
2013 Sep 25
1
Best and worst values for each date
Hi, May be you can try this: obj_name<- load("arun.RData") Pred1<- get(obj_name[1]) Actual1<- get(obj_name[2]) library(reshape2) dat<-cbind(melt(Pred1,id.vars="S1"),value2=melt(Actual1,id.vars="S1")[,3])? # to reshape to long form colnames(dat)[3:4]<- c("Predict","Actual") dat$variable<- as.character(dat$variable) #not that
2010 Sep 28
1
How to convert SEXP to double
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);" << "p$pred[1]"; SEXP ans; int iRet =
2011 Feb 28
3
nls not solving
I am running the following nls equation. I tried it with data that excel was fitting and got the error: singular gradient matrix at initial parameter estimates I thought it was due to a low number of points (6), but when I create a dataset, I get the same problem. If I remove the parameter "a," then it can find a solution. Does anyone know what I can do to fit this model?
2007 Jun 24
2
matlab/gauss code in R
Hi all! I would like to import a matlab or gauss code to R. Could you help me? Bye, Sebasti?n. 2007/6/23, r-help-request en stat.math.ethz.ch <r-help-request en stat.math.ethz.ch>: > Send R-help mailing list submissions to > r-help en stat.math.ethz.ch > > To subscribe or unsubscribe via the World Wide Web, visit >
2013 Sep 27
0
Best and Worst values
Ira, obj_name<- load("arun.RData") Pred1<- get(obj_name[1]) Actual1<- get(obj_name[2]) dat2<- data.frame(S1=rep(Pred1[,1],ncol(Pred1)-1),variable=rep(colnames(Pred1)[-1],each=nrow(Pred1)),Predict=unlist(Pred1[,-1],use.names=FALSE),Actual=unlist(Actual1[,-1],use.names=FALSE),stringsAsFactors=FALSE) dat2New<- dat2[!(is.na(dat2$Predict)|is.na(dat2$Actual)),] ?dat3<-
2006 May 03
2
Using a helper within another helper?
I am trying to push some view logic into a helper. The thought is that this is a step towards having the business logic in the helper rather than the view. However, I''m essentially wrapping the checks around an eventual call to date_select(). The problem I''m having is that the application complains that it doesn''t know about date_select(). I''m sure (or
2006 Jun 01
9
access model from controller
Hello, Rather new to RoR, so I''m not sure about the terminology and such :-/ . My question is: how could I know the model which is associated to a controller? For example: - controller class is TestController, which is a subclass of ApplicationController - associated model class is Test How could I write some code in a method of ApplicationController to dermine the current
2012 Oct 11
1
Problems with getURL (RCurl) to obtain list files of an ftp directory
Dear all, I have a problem with the command 'getURL' from the RCurl package, which I have been using to obtain a ftp directory list from the MOD16 (ET, DSI) products, and then to download them. (part of the script by Tomislav Hengl, spatial-analyst). Instead of the list of files (from ftp), I am getting the complete html code. Anyone knows why this might happen? This are the steps i
2012 Apr 05
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 23, 2012, at 4:46 PM, Bill Wendling wrote: > You need to look at how the equivalent code in C++ looks in LLVM IR. The "do something with x & y" part will be an 'invoke' that lands on at landing pad, where you will then call the d'tor to your allocated object. OK, after a lot of tinkering (and looking at the ExceptionDemo.cpp file), I have something that works
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 23, 2012, at 4:29 PM, Paul J. Lucas wrote: > On Mar 23, 2012, at 3:25 PM, Bill Wendling wrote: > >> Let's take your example. You will have code that looks like this: >> >> extern "C" void thunk_item_M_delete( void *v_that ) { >> item *that = 0; >> try { >> that = static_cast<item*>( v_that ); >>
2011 Feb 25
2
nls
hi, I would like to find the x value (independent variable) for a certain dependent value using the fitted model with nls. with (predict) I can find y that corresponds to a list of x. I need the other way around. can it be done? thanks, afadda
2009 Sep 14
2
[PATCH node-image] add livecd-iso-to-iscsi script to support iscsi root booting setup
This enables the ability to take the ovirt-node-image iso and deploy it to an iscsi disk. It also provides a sample pxe configuration for booting based on the iscsi root device. Includes support for user/password as well as reverse chap user/password. --- Makefile.am | 1 + livecd-iso-to-iscsi | 201 ++++++++++++++++++++++++++++++++++++++++++++++ ovirt-node-image.spec.in |
2007 Jan 01
1
DBus setting options broken
Using latest git if you try to set an option to the value it already has you get an error like 'dbus_bindings.DBusException: Method "set" with signature "s" on interface "org.freedesktop.compiz" doesn't exist' and setting it to a new value actually changes the setting but dbus times out waiting for a reply saying so. Setting a list gives the method
2009 May 05
0
stepAICc function (based on MASS:::stepAIC.default)
Dear all, I have tried to modify the code of MASS:::stepAIC.default(), dropterm() and addterm() to use AICc instead of AIC for model selection. The code is appended below. Somehow the calculations are still not correct and I would be grateful if anyone could have a look at what might be wrong with this code... Here is a working example: ## require(nlme) model1=lme(distance ~ age + Sex, data =