similar to: lm looking for weights outside of the user-defined function

Displaying 20 results from an estimated 2000 matches similar to: "lm looking for weights outside of the user-defined function"

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 *
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
2011 Dec 27
0
Using minsplit and unequal weights in rpart
Dear r-help mailing list, Is there a way to incorporate weights into the minsplit criteria in rpart, when the weights are uneven? I could not find a way for the minsplit threshold to take the weights into account, and when the weights are uneven it becomes an issue, as the following example shows. My current workaround is to expand the data into one in which each row is an observation, but that
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
2012 Feb 22
2
Several densityplots in single figure
Hi, I have created two separate overlapping density plots- see example code below. What I wish now to do is combine them into one figure where they sit side by side. Any help would be great! many thanks in advance, josh. ##################### thedataA <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data thedataA.m<-melt(thedataA) densityplot(~value, thedataA.m,
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
2008 Aug 13
2
which alternative tests instead of AIC/BIC for choosing models
Dear R Users, I am looking for an alternative to AIC or BIC to choose model parameters. This is somewhat of a general statistics question, but I ask it in this forum as I am looking for a R solution. Suppose I have one dependent variable, y, and two independent variables, x1 an x2. I can perform three regressions: reg1: y~x1 reg2: y~x2 reg3: y~x1+x2 The AIC of reg1 is 2000, reg2 is
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
2010 Mar 30
1
Efficiency question: replacing all NAs with a zero
Dear R'ers, I have a very large data frame (over 4000 rows and 2,500 columns). My task is very simple - I have to replace all NAs with a zero. My code works fine on smaller data frames - but I have to deal with a huge one and there are many NAs in each column. R runs out of memory on me ("Reached total allocation of 1535Mb: see help(memory.size)"). Is there any other, more efficient
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
2009 Sep 22
1
any way to make it work faster (deleting rows that contain certain values)
Hello, dear R'ers, index<-expand.grid(1:7,1:4,1:4,1:4,1:4,1:4,1:4,1:4,1:4,1:4,1:4) In this case, dim(index) is 7,340,032 (!) and 11. I realize it's huge. Then, I am trying to get rid of the undesired combinations of columns. They should not contain identical values in any 2 columns. Also if column 1 has a value of 5, there should be no 2 in any other column, if column 1 has a value
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 23
1
Returning NA from lm
Hi. I need to apply run a regression analysis for groups of data of fixed length:100 As, 100 Bs, 100 Cs etc. eg x Key Value A 1 A 21.2 A 4 A 6.5 ...repeat 96 times with differing values of A B 1 B 2.3 B NA B 6.5 ...repeat 96 times with differing values of B etc I run these against a linear model using tapply(data$Value, data$Key,FUN=regr,100)
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: