similar to: dropping rows

Displaying 20 results from an estimated 6000 matches similar to: "dropping rows"

2005 Sep 05
4
Dummy variables model
Hi, all! Anyone know an easy way to specify the following model. Panel dataset, with stock through time, by firm. I want to run a model of y on a bunch of explanatory variables, and one dummy for each firm, which is 1 for observations that come from firm i, and 0 everywhere else. I have over 200 firms (and a factor variable that contains a firm identifier). Any easy way of going about
2005 Mar 01
2
GARCH
Hi, everyone! Is there a function to do single-variable GARCH in R? If yes, what library is it in? Thanks! Toby -- ************************************************************************** When Thomas Edison invented the light bulb he tried over 2000 experiments before he got it to work. A young reporter asked him how it felt to have failed so many times. He said "I never failed once. I
2004 Nov 30
6
Combined variable names
I am trying to define a large number of variables through a loop construct. I have my loop variable i being cycled through 1:100 and I would like the variables produced by this to be called vi (i.e. v1 v2 v3 etc) so, for example I'm going: for(i in 1:100) { <blank> <- a[i:N] # or whatever else you want to put on the right side } where N is previously defined. What goes in
2005 May 19
3
Simultaneous estimation of mean and garch eq'n
Is it possible to simultaneously estimate mean and GARCH parameters in R? In other words, I would like to estimate the normal regression equation Y = b X + u and simultaneously do a garch process on the u's to correct the standard errors. I was thinking maybe something with systemfit(), but I can't quite come up with it. Thanks, Tobias --
2004 Nov 30
3
Relative subscripting
Hi! I'm trying to do the following. I have monthly a dataset with, among other things, "marketcap", and "return". I want to multiply return by the marketcap of the previous month. How do I do this? In STATA (which I have used frequently in the past) I would simply use an expression of the form return[_n]*marketcap[_n-1] I believe they call this relative
2006 Sep 20
2
Unexpected behavior of apply() over a 3d array
Dear listeRs, I'm finding that apply() behaves strangely when used on a 3-d array. For example: > at <- array(1:27,dim=c(3,3,3)) > at , , 1 [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 , , 2 [,1] [,2] [,3] [1,] 10 13 16 [2,] 11 14 17 [3,] 12 15 18 , , 3 [,1] [,2] [,3] [1,] 19 22 25 [2,] 20 23 26
2005 Aug 23
1
clustering of disturbances
Hi! I have a dataset of properties that are owned by different firms, each firm owning multiple properties. I am running a regression of holding period (how long a property was held in a firm's portfolio) on the left, and a bunch of factors on the right. When calculating standard errors, I would like to cluster my disturbance terms by firm. Any ideas on how to do this? I'm guessing
2006 Apr 04
2
R performance: different CPUs
Hello! I need to purchase a new box, which I would like to optimize for good R performance. For the record, I will run Fedora Core 5 as and OS, and I wanted to know if anyone has experience with how the following affects R performance: - Is there a big advantage to having a 64-bit CPU over having a 32-bit? - Does an Opteron offer any advantages over an Athlon, and if yes, does it justify an
2005 Jan 17
2
Omitting constant in ols() from Design
Hi! I need to run ols regressions with Huber-White sandwich estimators and the correponding standard errors, without an intercept. What I'm trying to do is create an ols object and then use the robcov() function, on the order of: f <- ols(depvar ~ ind1 + ind2, x=TRUE) robcov(f) However, when I go f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE) I get the following error: Error in
2016 Mar 03
2
as.vector in R-devel loaded 3/3/2016
I just installed R-devel to check my package before submitting. I got an error in my vignette in regards to as.vector. When I looked at the code for as.vector in R-devel it is standardGeneric for "as.vector" defined from package "base" function (x, mode) standardGeneric("as.vector") <environment: 0x0918ad70> Methods may be defined for arguments: x, mode Use
2005 May 27
4
Chars as numbers
Is there a proper function for transforming a character to a number instead of using i=match('c',letters) # 3 Thanks. Josef Eschgf??ller -- Josef Eschgf??ller Dipartimento Matematico Universita' di Ferrara http://felix.unife.it
2017 Apr 27
4
[Bug 100860] New: Dual Monitor display problem, after switching screen positions, with 4.10 Kernels
https://bugs.freedesktop.org/show_bug.cgi?id=100860 Bug ID: 100860 Summary: Dual Monitor display problem, after switching screen positions, with 4.10 Kernels Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: critical Priority:
2009 Jun 30
2
Using functions to change values in a data.frame
I'm having trouble with something that looks easy. (And I'm sure it will be easier within about 1 minute of receiving my first response.) Thanks in advance. I have a collection of data frames that I need to add columns, do some calculations and then fill in the new columns. Since I have a large number of similar data frames I want to do this with functions to make the code more readable
2009 Jul 01
2
?max (so far...)
Hi, I have a data.frame that is date ordered by row number - earliest date first and most current last. I want to create a couple of new columns that show the max and min values from other columns *so far* - not for the whole data.frame. It seems this sort of question is really coming from my lack of understanding about how R intends me to limit myself to portions of a data.frame. I get the
2009 Jul 01
1
running count in data.frame
Hi, I need to keep a running count of events that have happened in my data.frame. I found a document called usingR that had an example of doing this for random coin flips and I tried to modify it. It seems to sort of work in the beginning, but then it stops and I don't understand why. I'm trying to duplicate essentially the Excel capability of =SUM($A$1:$A(Row number)) The example
2012 Nov 09
3
if between 500-600 give 550
I have a data frame somewhat like this: myframe <- data.frame (ID=c(2,3,4,5), Hunger =c(415,452,550,318 )) myframe Now I would like to add a column to the right which summarizes the values for Hunger somewhat to reduce the number of values: If the values for Hunger are between 300-400 I would like to insert the number 350, between 400-500 insert 450 between 500-600 insert 550 Does
2012 Sep 26
2
average environmental data if AnimalID and Time is duplicated
Hello, I tried for about three hours now to solve this problem but I can't figure it out. I am sure someone knows how do it. At least I hope so. I have a data frame somewhat like this: myframe <- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 09:00", "24.09.2012 10:00",
2011 Mar 30
2
summing values by week - based on daily dates - but with some dates missing
Dear everybody, I have the following challenge. I have a data set with 2 subgroups, dates (days), and corresponding values (see example code below). Within each subgroup: I need to aggregate (sum) the values by week - for weeks that start on a Monday (for example, 2008-12-29 was a Monday). I find it difficult because I have missing dates in my data - so that sometimes I don't even have the
2017 Aug 19
4
My very first loop!! I failed. May I have some start-up aid?
Dear all, I have a data similar to this: myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"), Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"),
2010 Aug 13
3
transforming dates into years
Hello! If I have in my data frame MyFrame a variable saved as a Date and want to translate it into years, I currently do it like this using "zoo": library(zoo) as.year <- function(x) as.numeric(floor(as.yearmon(x))) myFrame$year<-as.year(myFrame$date) Is there a function that would do it directly - like "as.yearmon" - but for years? Thank you! -- Dimitri