similar to: pcse package - clarifying question about arguments groupN and groupT

Displaying 20 results from an estimated 3000 matches similar to: "pcse package - clarifying question about arguments groupN and groupT"

2011 May 06
0
pcse package error message concerning nrows of using data
Dear R Community, I am currently facing this seemingly obscure Problem with Panel Corrected Standard Errors (PCSE) following Beck & Katz (1995). As the authors suggest, I regressed a linear model (tmodel) with lm() with option "na.action=na.exclude" (I have also tried other options here). My dataframe is organized in pooled times series fashion, but with various missing values
2010 Jun 18
0
pcse package - is it OK to use it when my regression is weighted by each subgroup's mean
Hello! Just would like to make sure I am not doing something wrong. I am running an OLS regression. I have several subgroups in the data set (locations) - and in each location I have weekly data for 2 years - on my DV and on all predictors. Looks like this: location week DV Predictor1 Predictor 2 location1 week1 xxx xxxxxxx xxxxxxxxx location1 week2 xxx xxxxxxx xxxxxxxxx . .
2010 Oct 18
1
Question about lme (mixed effects regression)
Hello! If I run this example: library(nlme) fm1 <- lme(distance ~ age+Sex, Orthodont, random = ~ age + Sex| Subject) If I run: summary(fm1) then I can see the fixed effects for age and sex (17.7 for intercept, 0.66 for age, and -1.66 for SexFemale) If I run: ranef(fm1) Then it looks like it's producing the random effects for each subgroup (in this example - each subject). For example,
2010 Mar 30
4
Code is too slow: mean-centering variables in a data frame by subgroup
Dear R-ers, I have a large data frame (several thousands of rows and about 2.5 thousand columns). One variable ("group") is a grouping variable with over 30 levels. And I have a lot of NAs. For each variable, I need to divide each value by variable mean - by subgroup. I have the code but it's way too slow - takes me about 1.5 hours. Below is a data example and my code that is too
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
2010 Mar 26
4
Competing with SPSS and SAS: improving code that loops through rows (data manipulation)
Dear R-ers, In my question there are no statistics involved - it's all about data manipulation in R. I am trying to write a code that should replace what's currently being done in SAS and SPSS. Or, at least, I am trying to show to my colleagues R is not much worse than SAS/SPSS for the task at hand. I've written a code that works but it's too slow. Probably because it's
2010 May 08
1
Increasing the font size on axes in trellis
Hello, the code below gives me the picture I need - but there is on small thing I can't figure out. The plot has very small tick mark labels for both axes. I don't mean the axis labels - they are both good, but what is shown near the tick marks. Please help me figure out what parameter I should add to make those larger. I tried sticking cex.lab=1.3 in different places but it didn't
2009 Sep 23
2
Function to check if a vector contains a given value?
Dear R'rs, is there a function that checks if a given vector contains a certain value. E.g., x<-c(1,2,3,4). How can I get a TRUE or FALSE for whether x contains a 2? -- Dimitri Liakhovitski Ninah.com Dimitri.Liakhovitski at ninah.com
2010 Mar 18
1
R takes long time to open
Hello. Until today I've been using R2.9 and since today R2.10 (on a PC). In both of them it takes about 20 sec for the prompt to appear IN R console after I start R. And every time it says: "Previous saved work space restored" - even if I have not saved any workspace or, in case of R2.10 - even though I have not used it once. In the older versions - R would start within 2-3 sec. Is
2011 Apr 04
2
merging 2 frames while keeping all the entries from the "reference" frame
Hello! I have my data frame "mydata" (below) and data frame "reference" - that contains all the dates I would like to be present in the final data frame. I am trying to merge them so that the the result data frame contains all 8 dates in both subgroups (i.e., Group1 should have 8 rows and Group2 too). But when I merge it it's not coming out this way. Any hint would be
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
2010 Mar 09
2
looping through predictors
Dear R-ers, I have a data frame data with predictors x1 through x5 and the response variable y. I am running a simple regression: reg<-lm(y~x1, data=data) I would like to loop through all predictors. Something like: predictors<-c("x1","x2",... "x10) for(i in predictors){ reg<-lm(y~i) etc. } But it's not working. I am getting an error: Error in
2009 Oct 13
4
replacing period with a space
Dear R-ers! I have x as a variable in a data frame x. x<-data.frame(x=c("aa.bb","cc.dd.ee")) x$x<-as.character(x$x) x I am sorry for such a simple question - but how can I replace all periods in x$x with spaces? sub('.', ' ', x$x) - removes all letters to the left of each period... Thanks a lot for your advice! -- Dimitri Liakhovitski Ninah.com
2010 Mar 25
1
Precision level
Hello! I am wondering at what point does R consider a numeric value to be equal to zero - for statements of the type x==0 and x %in% 0. Thank you very much! -- Dimitri Liakhovitski Ninah.com Dimitri.Liakhovitski at ninah.com
2010 May 05
1
What is the default nPerm for regression in randomForest?
Could not find it in ?randomForest. Thank you for your help! -- Dimitri Liakhovitski Ninah.com Dimitri.Liakhovitski at ninah.com
2009 Sep 17
2
referring to a row number and to a row condition, and to columns simultaneously
Hello, dear R-ers! I have a data frame: x<-data.frame(a=c(4,2,4,1,3,4),b=c(1,3,4,1,5,0),c=c(NA,2,5,3,4,NA),d=rep(NA,6),e=rep(NA,6)) x When x$a==1, I would like to replace NAs in columns d and e with 8 and 9, respectively When x$a != 1, I would like to replace NAs in columns d and e 101 and 1022, respectively. However, I only want to do it for rows 2:5 - while ignoring what's happening in
2010 May 05
0
Which column in randomForest importances (for regression) is MSE and which IncNodePurity
I've run the function randomForest with importance=T. All my variables (predictors and the dependent variable) are numeric. rf<-randomForest(formula, data=mydata, importance=T, etc.) my results object "rf" contains predictor importances: rf$importance I am seeing two columns: %IncMSE IncNodePurity V1 -0.01683558 58.10910 V2 0.04000299 71.27579 V3 0.01974636
2010 Mar 04
4
Analogue to SPSS regression commands ENTER and REMOVE in R?
I am not sure if this question has been asked before - but is there a procedure in R (in lm or glm?) that is equivalent to ENTER and REMOVE regression commands in SPSS? Thanks a lot! -- Dimitri Liakhovitski Ninah.com Dimitri.Liakhovitski at ninah.com
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
2009 Sep 23
0
R: Function to check if a vector contains a given value?
?any any(x==2) Stefano -----Messaggio originale----- Da: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]Per conto di Dimitri Liakhovitski Inviato: mercoled? 23 settembre 2009 17.38 A: R-Help List Oggetto: [R] Function to check if a vector contains a given value? Dear R'rs, is there a function that checks if a given vector contains a certain value. E.g.,