similar to: re siduals

Displaying 20 results from an estimated 30000 matches similar to: "re siduals"

2008 Nov 18
1
Re siduals from a linear model
I'm working with a linear model with four factors as explicatory variables, being all of them significally (e.g. y ~ a + b + c + d). I thought that the residuals of a linear model keep the variance not explained by the model, so if I use my model with just three factors (y ~ a + b + c) and keep the residuals is expected that in a new model with the residuals as dependent variable and the four
2009 Feb 11
2
Linear model
I want to know how accurate are the p-values when you do linear regression in R? I was looking at the variable x3 and the t=10.843 and the corresponding p-value=2e-16 which is the same p-value for the intercept where the t-value for the intercept is 48.402. I tried to calculate the p-value in R and I got 0 x<-2*(1-pt(10.843,2838)) > x [1] 0 > G<-lm(y~x1+x2+x3+x4+x5) >
2007 Nov 02
0
Significance-Problems by using arma/xreg.
Hello. I've got a problem with arma/xreg. I would like to get a better model-fit by implenting some external explanatory variable, so I thought I can implement it by expand the arima-function with an xreg-argument: I have two stationary data vectors y and x of length 201: y <-
2009 Feb 10
7
How to split a character vector into 3 vectors
Hi , Does any one know how to split a character vector , I have a vector X that looks like this and each row has 3 characters X ASK DGH ASG AUJ FRT I would like to split the vector into 3 vectors that look like this X1 X2 X3 A S K D G H A S G A U J U R T thanks -- View this message in context: http://www.nabble.com/How-to-split-a-character-vector-into-3-vectors-tp21939492p21939492.html
2008 Dec 14
3
Some clarificatins of anova() and summary ()
I have two assignment problems... I have written this small code for regression with two regressors . n <- 50 x1 <- runif(n,1,10) x2 <- x1 + rnorm(n,0,0.5) plot(x1,x2) # x1 and x2 strongly correlated cor(x1,x2) y <- 3 + 0.5*x1 + 1.1*x2 + rnorm(n,0,2) intact.lm <- lm(y ~ x1 + x2) summary(intact.lm) anova(intact.lm) the questions are 1.The function summary() is convenient since
2008 Dec 14
3
Some clarificatins of anova() and summary ()
I have two assignment problems... I have written this small code for regression with two regressors . n <- 50 x1 <- runif(n,1,10) x2 <- x1 + rnorm(n,0,0.5) plot(x1,x2) # x1 and x2 strongly correlated cor(x1,x2) y <- 3 + 0.5*x1 + 1.1*x2 + rnorm(n,0,2) intact.lm <- lm(y ~ x1 + x2) summary(intact.lm) anova(intact.lm) the questions are 1.The function summary() is convenient since
2006 Aug 31
0
Pretty-printing multiple regression models
A few days ago, I had asked this question. Consider this situation: > x1 <- runif(100); x2 <- runif(100); y <- 2 + 3*x1 - 4*x2 + rnorm(100) > m1 <- summary(lm(y ~ x1)) > m2 <- summary(lm(y ~ x2)) > m3 <- summary(lm(y ~ x1 + x2)) You have estimated 3 different "competing" models, and suppose you want to present the set of models in one table. xtable(m1) is
2008 Aug 22
1
problem with rbind
I am trying to use rbind to have the two data on the top of each other but I am getting an extra X on the column header and the rows are numberd , How to get rid of this problem? I appreciate your help x1<- read.table(file="data1.txt", header=T, sep="\t") x2<-read.table(file="data2.txt", header=T, sep="\t") y<-rbind(x1,x2) > y X0
2003 Sep 01
1
Arima with an external regressor
Hello, Does anybody know if the function arima with an external regressor (xreg) applies the auto correlation on the dependant variable or on the residuals. In comparison with SAS (proc autoreg), it seems that the auto correlation applies on the residuals but i'd like to have the confirmation. I want to estimate: Y[t] = a[1]*X[t] + a[2] + E[t] with E[t]=b[1]*E[t-1] Should I use : arima(Y,
2011 Jun 14
1
Using MLE Method to Estimate Regression Coefficients
Good Afternoon, I am relatively new to R and have been trying to figure out how to estimate regression coefficients using the MLE method. Some background: I am trying to examine scenarios in which certain estimators might be preferred to others, starting with MLE. I understand that MLE will (should) produce the same results as Ordinary Least Squares if the assumption of normality holds. That
2006 Aug 31
0
Ooops, small mistake fixed (pretty printing multiple models)
The R code I just mailed out had a small error in it. This one works. Now what one needs is a way to get decimal alignment in LaTeX tabular objects. x1 <- runif(100); x2 <- runif(100); y <- 2 + 3*x1 - 4*x2 + rnorm(100) m1 <- summary(lm(y ~ x1)) m2 <- summary(lm(y ~ x2)) m3 <- summary(lm(y ~ x1 + x2)) # What I want is this table: # #
2016 Apr 04
1
Test for Homoscedesticity in R Without BP Test
On Mon, 4 Apr 2016, varin sacha via R-help wrote: > Hi Deepak, > > In econometrics there is another test very often used : the white test. > The white test is based on the comparison of the estimated variances of > residuals when the model is estimated by OLS under the assumption of > homoscedasticity and when the model is estimated by OLS under the > assumption of
2010 Mar 26
2
R loop help
Hi, I am tring to write a loop to compute this, ========================== x1=c( rep(-1,4), rep(1,4) ) x2=c( rep(c(-1,-1,1,1),2) ) x3=c( rep(c(-1,1),4) ) x1*x2 x1*x3 x2*x3 ======================== suppose i have x1,x2,x3 i want to compute their ' two factor interactions', x1x2,x1x3 and x2x3, I wrote ======================== for(i in 1:2){ for( j in i+1:3){ xij=c()
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hi Arie, Thank you for your further research into the issue. Regarding Stata: On the other hand, JMP gives model matrices that use the main effects contrasts in computing the higher order interactions, without the dummy variable encoding. I verified this both by analyzing the linear model given in my first example and noting that JMP has one more degree of freedom than R for the same model, as
2012 Jul 07
0
regressor & autoregressive error?
Hello, I am using R for fitting parameters of a time series model. The model is as below. Y(t) = mu + a*X(t) + YN(t) where YN(t) = b*YN(t-1) + innovation and Z(t) follows N(0,1). The main obstacle for me is the autoregressive error term, YN(t). I can't figure out how to estimate the parameters (mu, a, b) with usual 'arima' function in R. What I have tried is.... 1. Do the
2003 Jul 09
0
model selection in lme when corARMA is assumed
I have a data analysis job for which lme may be used. Prof. Spencer Graves had helped me much on that. I'm really appreciated for that. Could anybody else in the list give me some hints from other perspectives? I hope I can learn as much as possible for this complicated real data. Thanks in advance. Hanhan To briefly describe my data: My data is health effect measurements (y) and personal
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hi Arie, The book out of which this behavior is based does not use factor (in this section) to refer to categorical factor. I will again point to this sentence, from page 40, in the same section and referring to the behavior under question, that shows F_j is not limited to categorical factors: "Numeric variables appear in the computations as themselves, uncoded. Therefore, the rule does not
2009 Aug 20
1
how to compute this summation...
Dear R users, I try to compute this summation, http://www.nabble.com/file/p25054272/dd.jpg where f(y|x) = Negative Binomial(y, mu=exp(x' beta), size=1/alp) http://www.nabble.com/file/p25054272/aa.jpg http://www.nabble.com/file/p25054272/cc.jpg In fact, I tried to use "do.call" function to compute each u(y,x) before the summation, but I got an error, "Error in X[i, ]
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hi Arie, I understand what you're saying. The following excerpt out of the book shows that F_j does not refer exclusively to categorical factors: "...the rule does not do anything special for them, and it remains valid, in a trivial sense, whenever any of the F_j is numeric rather than categorical." Since F_j refers to both categorical and numeric variables, the behavior of
2007 Jun 16
1
fSeries - Ox - ver: 240.10068 - Steps to make it work
-Bugs and fixes reported to Diethelm Wuertz. -In the interim. To make the Ox functions part of the fSeries package work please follow the following steps. ------------------------------------------------- 1. Install R-project. 2. Install fSeries. 3. Download: http://www.core.ucl.ac.be/~laurent/G@RCH/site/xbdcons/garch42.zip (G@RCH package for Ox) 4. Download: