similar to: Returning NA from lm

Displaying 20 results from an estimated 7000 matches similar to: "Returning NA from lm"

2009 Feb 03
0
Multiple statements in tryCatch
Hi, tryCatch seems to be evaluating the all expressions wrapped in it before passing control to the error handling function. For example, the code below will try to evaluate "results" even though the call to odbcConnect fails. I was hoping that the mechanism would work in the same way as a C++ try catch structure and pass control to the catch... as soon as an exception is generated.
2010 Oct 22
1
lm looking for weights outside of the user-defined function
Dear R'ers, I am fighting with a problem that is driving me crazy. I use "lm" in my user-defined function, but it seems to be looking for weights outside of my function's environment: ### Generating example data: x<-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1)) myweights<-runif(100) data.for.regression<-x[1:3] ### Creating function
2008 Aug 17
2
grangertest/lmtest ... what am I doing wrong ?
Dear Achim, R Users, What am I doing wrong in this example ? a<-zoo(rnorm(100),order.by=1:100) b<-lag(a) regr<-na.exclude(merge(a,b)) plot(regr) grangertest(regr[,1],regr[,2],3) > a<-zoo(rnorm(100),order.by=1:100) > b<-lag(a) > regr<-na.exclude(merge(a,b)) > plot(regr) > grangertest(regr[,1],regr[,2],3) Error in solve(vc[ovar, ovar]) : subscript out of bounds
2023 May 09
1
RandomForest tuning the parameters
Hi Sacha, On second thought, perhaps this is more the direction that you want ... X2 = cbind(X_train,y_train) colnames(X2)[3] = "y" regr2<-randomForest(y~x1+x2, data=X2,maxnodes=10, ntree=10) regr regr2 #Make prediction predictions= predict(regr, X_test) predictions2= predict(regr2, X_test) HTH, Eric On Tue, May 9, 2023 at 6:40?AM Eric Berger <ericjberger at gmail.com>
2008 Jul 02
1
Problem with strucchange package
Dear R Users, I am attempting to use the strucchange package but get an error which is difficult to decipher. I get the following error with breakpoints: > bp<-breakpoints(regr[,1]~regr[,2]+regr[,3]) Error in my.RSS.table[as.character(i), 3:4] <- c(pot.index[opt], break.RSS[opt]) : nothing to replace with I was wondering if anyone has seen this issue before and off the top of
2013 Apr 02
1
Iterative regression through a series
Hello, Some context:  let's say I have a data series (let's call it PRICE, for simplicity), sample size N.  I have a desire to regress that on TIME, and then to use the TIME and intercept coefficients to predict the price in the next period and to use the standard error to calculate a confidence interval.  This is all very easy. However, what I need help for is to calculate a
2010 Jul 22
1
does package "QuantPsych" function lm.beta can handle results of a regression with weights?
Hello, and sorry for not providing an example. I run a regular linear regression (using lm) and use weights with it (weights = ...). I use "QuantPsych" package, its function lm.beta to extract standardized regression weights from my lm regression object. When I don't use weights, everything is fine. But when I do use weights, I get an error that refers to lm.beta code: "In b *
2013 Feb 24
2
[xen-4.2-testing test] 16260: regressions - FAIL
flight 16260 xen-4.2-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/16260/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-i386-i386-xl 5 xen-boot fail REGR. vs. 16228 test-i386-i386-xl-qemuu-winxpsp3 5 xen-boot fail REGR. vs. 16228 test-i386-i386-win 5
2011 Mar 18
1
Problem with Slope.test function
Hi all, I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. I try to use Slope.test function from emu package, but an error occured... library(emu) d1<-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15), P2=c(1,2,5,8,11,13,15,15,18,24), R=c(2,7,8,9,16,21,27,31,33,36)) # First data set m1<-lm(R~P1+P2+P1*P2,data=d1) # Regr.
2012 Jul 03
2
[xen-unstable test] 13439: regressions - FAIL
flight 13439 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/13439/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-i386-i386-xl-qemuu-winxpsp3 9 guest-localmigrate fail REGR. vs. 13379 test-amd64-amd64-xl-qemuu-win7-amd64 9 guest-localmigrate fail REGR. vs. 13376 Regressions which are regarded as
2013 Nov 20
3
[xen-unstable test] 22043: regressions - trouble: blocked/broken/fail/pass
flight 22043 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/22043/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl 9 guest-start fail REGR. vs. 22033 build-armhf 4 xen-build fail REGR. vs. 22033 test-amd64-i386-xl-qemut-winxpsp3-vcpus1
2011 Sep 01
4
[xen-unstable test] 8803: regressions - FAIL
flight 8803 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/8803/ Regressions :-( Tests which did not succeed and are blocking: test-amd64-i386-rhel6hvm-intel 4 xen-install fail REGR. vs. 8769 test-amd64-i386-xl 4 xen-install fail REGR. vs. 8769 test-amd64-i386-pair 6 xen-install/dst_host fail REGR. vs. 8769
2007 Nov 28
2
alternatives to traditional least squares method in linear regression ?
Dear list, I have encountered a special case for searching a linear regression where I'm not satisfied with the results obtained using the traditional least squares method (sometimes called OLS) for estimating/optimizing the residues to the regression line (see code below). Basically, a group of my x-y data are a bit off the diagonal line (in my case the diagonal represents the ideal or
2013 Nov 30
7
[xen-unstable test] 22184: regressions - trouble: broken/fail/pass
flight 22184 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/22184/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-winxpsp3 7 windows-install fail REGR. vs. 22106 test-amd64-i386-xl-win7-amd64 9 guest-localmigrate fail REGR. vs. 22106 Regressions which are regarded as
2009 Jan 06
5
Changing Matrix Header
Dear all, I have the following matrix. > dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1 [3,] 0 0 0 0 0 0 0 0 0 2 How can I change it into: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1
2011 Sep 22
1
Header auslesen und bei Regression verwenden
Hi. First, a little preliminary observation: in this thread, it is indeed a (multiple linear) regression model, the real problem is but my opinion on general questions about R assign. So as I said, I want to do a regression analysis, however, for several target variables or data tables. This case, although the target variable is always the same, but the data comes from different sectors, ie, I
2011 Nov 10
3
optim seems to be finding a local minimum
Hello! I am trying to create an R optimization routine for a task that's currently being done using Excel (lots of tables, formulas, and Solver). However, otpim seems to be finding a local minimum. Example data, functions, and comparison with the solution found in Excel are below. I am not experienced in optimizations so thanks a lot for your advice! Dimitri ### 2 Inputs:
2012 Jun 22
2
[xen-unstable test] 13339: regressions - FAIL
flight 13339 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/13339/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-sedf-pin 9 guest-start fail REGR. vs. 13025 Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-sedf 9 guest-start
2005 Sep 07
1
solving a system of nonlinear equations
What is the "classic" R function for solving a (possibly over determined) system of non-linear equations? Thank you! Moshe Olshansky e-mail: moshe.olshansky@brevanhoward.com The information transmitted is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or
2012 Sep 17
1
[xen-4.2-testing test] 13798: regressions - FAIL
flight 13798 xen-4.2-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/13798/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rhel6hvm-amd 5 xen-boot fail REGR. vs. 13739 test-amd64-amd64-xl-win 5 xen-boot fail REGR. vs. 13739 Regressions which are regarded as