similar to: Help needed on applying a function across different data sets and aggregating the results into a single data set

Displaying 20 results from an estimated 2000 matches similar to: "Help needed on applying a function across different data sets and aggregating the results into a single data set"

2010 Feb 04
1
plm issues: error for "within" or "random", but not for "pooling"
Dear all I am working on unbalanced panel data and I can readily fit a "pooling" model using plm(), but not a "within" or "random" model. Reproducing the examples in vignette("plm") and in the AER package I encountered no such issues. ##unfortunately I cannot disclose the data, and it is too big anyway > dim(ibes.kld.exp.p[x.subs , ]) [1] 13189 34
2010 Feb 10
0
Help needed in fine tuning the sapply output
Hi All, Say I have a data set with the following structure: Lines <- "ID ref_rank R1 R2 R3 R4 R5 R6 A 6 3 NA NA 7 8 2 B 7 4 NA NA 9 5 10 C 3 7 NA NA 8 10 8 D 4 2 NA NA 4 8 1 E 2 5 NA NA 4 7 7 F 8 5 NA NA 7 10 9 G 5 9 NA NA 8 10 2 H 1 6 NA NA 7 10
2009 Jun 01
2
Sweave:Figures from plot (LME output) not getting generated (pdf or eps)
Hi, I seem to be facing a strange problem when I use Sweave for creating a LaTeX document of the R lme() output --- The EPS and PDF figure files get created, but are empty. I have attached a reproducible example below (taken from the R lme() help example). ------------------------------------------------------------------------------------ \documentclass[a4paper,10pt]{article}
2009 Nov 27
1
my failing understanding ...
The following I do not understand, but then I did'nt really use S4 methods ... > showMethods(plot) Function: plot (package graphics) x="ANY" x="lmList.confint" x="merMCMC" (inherited from: x="ANY") > plot(x=moda0MCMC) Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double' > class(moda0MCMC) [1]
2010 Feb 25
2
error using pvcm() on unbalanced panel data
Dear all I am trying to fit Variable Coefficients Models on Unbalanced Panel Data. I managed to fit such models on balanced panel data (the example from the "plm" vignette), but I failed to do so on my real, unbalanced panel data. I can reproduce the error on a modified example from the vignette: > require(plm) > data("Hedonic") > Hed <- pvcm(mv ~ crim + zn + indus
2009 Nov 28
1
Plot-region not complete
Hello there, after I solved many problems in the last days with R I wanted to complete my plot. I used ylab=expression(paste("log(",mu,"/",cm^2,"/VS)")) to have greek symbols and to change cm^2 to cm?. Also cm^-3 I have in another plot, but it cuts my ^2 to _ in the y-axis. here is the code and I attach the plot: jpeg(file="Tabh2.jpg",quality=100)
2009 Jun 17
1
sapply() related query
Hi folks, I'm trying to consolidate the outputs (of anova() and lrm()) from multiple runs of single-variable logistic regression. Here's how the output looks: ------------------------------------------------------------ y ~ x1 y ~ x2 y ~ x3 y ~ x4 Chi-Square 0.1342152 1.573538 1.267291 1.518200 d.f. 2 2
2009 Jun 03
1
Lattice(barchart) related query
Hi, I have been recently experimenting with the lattice package, which I must admit is just great! However, I'm sort of stuck in modifying certain parameters; Would appreciate some pointers on a couple of things: 1) Is it possible to change the font of the labels (say to computer modern) -- either in the Windows output or thru' Sweave (generating EPS/PDF)? 2) As you will notice, there
2009 Sep 25
2
summarize-plyr package
Hi,I am using the amazing package 'plyr". I have one problem. I would appreciate help to fix the following error: Thanks. ______________________________ > library(plyr) > data(baseball) > summarise(baseball, + duration = max(year) - min(year), + nteams = length(unique(team))) Error: could not find function "summarise" > ddply(baseball, "id", summarise, +
2004 Jul 12
6
proportions confidence intervals
Dear R users this may be a simple question - but i would appreciate any thoughts does anyone know how you would get one lower and one upper confidence interval for a set of data that consists of proportions. i.e. taking a usual confidence interval for normal data would result in the lower confidence interval being negative - which is not possible given the data (which is constrained between
2009 Oct 29
1
change in default behavior of ?functionname in R 2.10?
Hi everyone, I just installed R 2.10 using the Windows binary. At some point in the past using the Windows binary installation, the default behavior of ?functionname changed from plain text to a nice html interface. Now with R 2.10, the default behavior has changed back to the plain text help. I assume this has some thing to do with these changes listed for R 2.10, but I don't quite
2009 Mar 13
1
lsfit w/ rank-deficient x
Dear R-devel, It seems that lsfit incorrectly reports coefficients when the input matrix 'x' is rank-deficient, see the example below: ## here values of 'b' and 'c' are incorrectly swapped > x <- cbind(a=rnorm(100), b=0, c=rnorm(100)); y <- rnorm(100); lsfit(x, y)$coef Intercept a b c -0.0227787 0.1042860 -0.1729261 0.0000000 Warning
2009 Oct 25
1
lsfit residuals
I'm trying to extract the points above and below a particular lsfit. I can only get the residuals from the original fit though. x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, test)) abline(lsfit(1:100, test + sd(test))) #I want the points above THIS line. Is there a way to use the coefficients from the fit to do this? Thanks for any help.
2003 Jul 21
5
how to test whether two slopes are sign. different?
Not really r-specific: Z = (b1 - b2) / SQRT ( SEb1^2 + SEb2^2) -------Original Message------- From: Gijsbert Stoet <stoet at volition.wustl.edu> Sent: 07/20/03 09:51 PM To: r-help at stat.math.ethz.ch Subject: [R] how to test whether two slopes are sign. different? > > Hi, suppose I do want to test whether the slopes (e.g. determined with lsfit) of two different population are
2002 May 14
1
princomp
Hello experts, as newcomer in pca, i have a question, concerning the princomp algorithm. With a dataset "r" containing 18 "input" parameters and 1 "output" parameter r[19], i got with the following fit ls <- lsfit(r[1:18],r[19]); lsdiag <- ls.diag(ls); lsdiag$std.dev a prediction error of: [1] 8.879561 what is quite reasonable. If i take only two
1997 Apr 30
1
R-beta: ls.print
ls.print produces error that I don't seem to be able to trace. Output of the commands as follows: (hyeung is a 24x2 matrix of data) ------------------------------------------------- > summary(hyeung) x.1 x.2 Min. : 28.0 Min. : 10.0 1st Qu.: 72.0 1st Qu.: 87.5 Median : 86.5 Median : 92.5 Mean : 81.0 Mean : 82.5 3rd Qu.: 97.0 3rd Qu.:100.0 Max.
1997 Apr 30
1
R-beta: ls.print
ls.print produces error that I don't seem to be able to trace. Output of the commands as follows: (hyeung is a 24x2 matrix of data) ------------------------------------------------- > summary(hyeung) x.1 x.2 Min. : 28.0 Min. : 10.0 1st Qu.: 72.0 1st Qu.: 87.5 Median : 86.5 Median : 92.5 Mean : 81.0 Mean : 82.5 3rd Qu.: 97.0 3rd Qu.:100.0 Max.
2016 Apr 20
6
Solving sparse, singular systems of equations
I have a situation in R where I would like to find any x (if one exists) that solves the linear system of equations Ax = b, where A is square, sparse, and singular, and b is a vector. Here is some code that mimics my issue with a relatively simple A and b, along with three other methods of solving this system that I found online, two of which give me an error and one of which succeeds on the
2016 Apr 20
0
Solving sparse, singular systems of equations
This is not a solution but your lsfit attempt #Error in lsfit(A, b) : only 3 cases, but 4 variables lsfit(A,b) gave that error because lsfit adds a column of 1 to its first argument unless you use intercept=FALSE. Then it will give you an answer (but I think it converts your sparse matrix into a dense one before doing any linear algebra). Bill Dunlap TIBCO Software wdunlap tibco.com On
2013 Apr 25
1
lsfit: Error in formatting error message
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d