similar to: residuals with missing values

Displaying 20 results from an estimated 10000 matches similar to: "residuals with missing values"

2004 Apr 21
2
Question on CAR appendix on NLS
The PDF file on the web, which is an appendix on nonlinear regression associated with the CAR book, is very nice. When I ran through the code presented there, I found something odd. The code does a certain model in 3 ways: Vanilla NLS (using numerical differentation), Analytical derivatives (where the user supplies the derivatives) and analytical derivatives (using automatic differentiation). The
2005 Sep 25
1
Question on lm(): When does R-squared come out as NA?
I have a situation with a large dataset (3000+ observations), where I'm doing lags as regressors, where I get: Call: lm(formula = rj ~ rM + rM.1 + rM.2 + rM.3 + rM.4) Residuals: 1990-06-04 1994-11-14 1998-08-21 2002-03-13 2005-09-15 -5.64672 -0.59596 -0.04143 0.55412 8.18229 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.003297 0.017603
2004 Mar 01
6
Find out the day of week for a chron object?
I know that this is correct: library(chron) x = dates("01-03-04", format="d-m-y", out.format="day mon year") print(x) It gives me the string "01 Mar 2004" which is correct. I also know that I can say: print(day.of.week(3,1,2004)) in which case he says 1, for today is monday. My question is: How do I combine these two!? :-) I have a
2001 Aug 29
1
suggestion for example for base:naresid
Dear list: since it took me a little while to figure out how to make use of naresid, I thought that the below R code might be useful as an example on the help page. Regards, Markus # generate some data x1 <- runif(20) y <- 10 + 5*x1 + rnorm(20) summary(lm.0 <- lm(y ~ x1)) # append some NA's to y y <- c(y, rep(NA, 5)) # generate some further x1s x1 <- c(x1, runif(5)) #
2004 Jun 21
2
Elementary sapply question
I am discovering sapply! :-) Could you please help me with a very elementary question? Here is what I know. The following two programs generate the same answer. --------------------------------+---------------------------------------- Loops version | sapply version --------------------------------+----------------------------------------
2004 Jul 05
2
More difficulties in getting data into R
In order to get around the problems of my posting a few minutes ago, I thought: $ awk -F\| '(NR > 2) {print $2}' cmie_firm_data.text > col2 $ awk -F\| '(NR > 2) {print $4}' cmie_firm_data.text > col4 $ paste col2 col4 | head -2 -510.45 -510.27 60700 101900 $ paste col2 col4 | tail -2 28648.12 31617.02 491014.77 494308.52 $ wc -l col2 col4 89323 col2
2004 Feb 19
6
R for economists (was: Almost Ideal Demand System)
Hi, I did not find any web page about using R in economics and econometrics so far. However, this does not mean that there is none (searching with google for "R" and "economics" gives many pages about economics and a name like Firstname R. Lastname on it ;-)). Does anybody in the list does know such a web page? If not, I will be happy if you, Ajay, could build and
2002 May 20
1
suggestion for example for base:naresid
Dear list: since it took me a little while to figure out how to make use of naresid, I thought that the below R code might be useful as an example on the help page. Regards, Markus # generate some data x1 <- runif(20) y <- 10 + 5*x1 + rnorm(20) summary(lm.0 <- lm(y ~ x1)) # append some NA's to y y <- c(y, rep(NA, 5)) # generate some further x1s x1 <- c(x1, runif(5)) #
2005 May 08
2
Need a factor level even though there are no observations
I'm in this situation: factorlabels <- c("School", "College", "Beyond") with data for 8 families: education.man <- c(1,2,1,2,1,2,1,2) # Note : no "3" values education.wife <- c(1,2,3,1,2,3,1,2) # 1,2,3 are all present. My goal is to create this table: School College Beyond
2004 May 27
3
Date parsing question
How do I parse a date "yyyymmdd"? I tried asking chron(s, "ymd") but that didn't work. Would the date parsing routines of the Date class of 1.9 grok this? -- Ajay Shah Consultant ajayshah at mayin.org Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2004 Mar 03
5
get.hist.quote - is great, but am I missing something?
I find it's just great to be able to say: library(tseries) x <- get.hist.quote(instrument="ongc.ns") and it gets a full time-series of the stock price of the symbol ongc.ns from Yahoo quote. However, once my hopes have been raised by such beauty :-) I get disappointed when I do > plot(x) and the annotation is horrible! The x axis is not labelled as dates. The default
2004 Mar 02
2
Stuck in trying to convert repetitive code into a function
Folks, I have the following repetitive code which works correctly: A = read.table(file="junior.csv", sep=",", col.names=c("date", "l")); A$date = chron(as.character(A$date), format="m/d/y"); r.junior = levels2weeklyret(lastfriday, A$date, A$l); plot(A$date, A$l, type="l", col="red", main="Junior levels")
2005 Aug 19
1
Problem with get.hist.quote() in tseries
When using get.hist.quote(), I find the dates are broken. This is with R 2.1.1 on Mac OS X `panther'. > library(tseries) Loading required package: quadprog 'tseries' version: 0.9-27 'tseries' is a package for time series analysis and computational finance. See 'library(help="tseries")' for details. > x <-
2004 Feb 23
6
Need help on parsing dates
I know this: > library(date) > x="1979-04-04" > try=as.date(x, "ymd") > print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: > x=1979-04-04 > print(x) [1] 1971 I'm stuck in reading from a file. I say: > A <- read.table(file="try") > print(A) V1 V2 1 1979-04-04
2011 Mar 10
1
Problem with defining new method for residuals()
Dear all, I'm writing a package and I would like to reuse the residuals() function. When I use a function which calls the redefined residuals (for my custom class) I get an error (see below). It looks like the wrong method is used. The strange this is, that when it execute the code manually it get no error. Any suggestions? Best regards, Thierry The entire source code is at
2004 Mar 11
1
Difficulties in interaction between R and latex (prosper)
Hello, folks! I'm trying to use R as a graphics program, to make some pretty graphs that will go into prosper slideshows. I wrote this fragment, from the R manual, into a file demo.R: x=seq(-3,3,0.1) postscript("cm_test.eps", width = 4.0, height = 3.0, horizontal = FALSE, onefile = FALSE, paper = "special", family =
2005 May 27
1
R commandline editor question
I am using R 2.1 on Apple OS X. When I get the ">" prompt, I find it works well with emacs commandline editing. Keys like M-f C-k etc. work fine. The one thing that I really yearn for, which is missing, is bracket matching When I am doing something which ends in )))) it is really useful to have emacs or vi-style bracket matching, so as to be able to visually keep track of whether I
2004 Mar 20
9
Operating on windows of data
I have a data set that is comprised of, for simplicity, a vector of numbers that I want to march across in overlapping windows of say 10 values each, computing a couple of values for each window. Is there a vectorized way to do this, or do I truly need to resort to looping--I think so? Any other clever thoughts? Thanks, Sean [[alternative HTML version deleted]]
2004 Apr 01
5
boot question
What in the world am I missing?? > x<-rnorm(20) > mean(x) [1] -0.2272851 > results<-boot(x,mean,R=5) > results[2] $t [,1] [1,] -0.2294562 [2,] -0.2294562 [3,] -0.2294562 [4,] -0.2294562 [5,] -0.2294562 Jeff Morris Ortho-Clinical Diagnostics A Johnson & Johnson Co. Rochester, NY Tel: (585) 453-5794 [[alternative HTML version deleted]]
2004 Apr 14
7
trend turning points
Hi, does anybody know of a nice test to detect trend turning points in time series? Possibly with reference? Thanks, joerg