Displaying 20 results from an estimated 6000 matches similar to: "Engel curve"
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi,
is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates?
I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object.
Many thanks,
Werner
__________________________________________________
Do
sragenden Schutz gegen Massenmails.
2006 Apr 05
5
List to Array
Hi,
this is probably the easiest thing to do but I manage
not finding the answer:
I have a list with matrices of exact same format and
headers. Now I would like to transform the list into
an normal array. What is the proper way to do this?
as.array changes the entire format and right now I
only found the method of creating a new array, going
through the entire list and copy the matrix in each
2012 Jun 07
1
Quantile regression: Discrepencies Between optimizer and rq()
Hello Everyone,
I'm currently learning about quantile regressions. I've been using an
optimizer to compare with the rq() command for quantile regression.
When I run the code, the results show that my coefficients are consistent
with rq(), but the intercept term can vary by a lot.
I don't think my optimizer code is wrong and suspects it has something to do
with the starting
2006 May 12
3
optimal way to compute matrix subtotals?
Hi!
I have large matrices, one column per variable and I have a vector of factors / grouping symbols. Then I am computing subtotals for the groups but it takes pretty long and thus I wanted to ask if there is a better way to do it or if this is already the best way:
subTotals <- function(x, groupvec) do.call("rbind",lapply(split(x,groupvec),colSums,na.rm=T))
Thanks reading my
2006 Jan 10
5
matching country name tables from different sources
Hi,
Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it.
I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly.
Has anyone done this or any recommendation on what commands I
2008 Jul 27
4
Object-oriented programming in R for Java programmers?
Hi,
I was wondering if anybody might have a reference for
me: My R code is growing and getting more and more
confusing. Thus, I figure it's time to switch to
object-oriented again. I have done oo programming in
C++ and Java before but the first few tutorial on R oo
were a bit confusing for me.
Is there any brief tutorial on oo programming in R
especially for people who have done oo in Java
2009 Jul 21
1
package quantreg behaviour in weights in function rq,
Dear all,
I am having v.4.36 of Quantreg package and I noticed strange behaviour when
weights were added. Could anyone please explain me what if the results are
really strange or the behavioiur is normal. As an example I am using dataset
Engel from the package and my own weights.
x<-engel[1:50,1]
y<-engel[1:50,2]
w<-c(0.00123, 0.00050, 0.00126, 0.00183, 0.00036, 0.00100,
0.00122,
2008 Feb 21
2
column name handling and long labels
Hi,
I have two loosely related questions which could make
my live again a bit easier:
1) Is there a simple way to select a range of columns
in a data frame using column names?
I am thinking of something like mydf[1,"col4":"col8"]
2) I have a data frame with many columns and they all
have short variable names which is good in most cases
but sometimes it would be nice to have
2009 Mar 02
4
portable R editor
Hi,
I have been dreaming about a complete R environment on my USB stick for a long time. Now I finally want to realize it but what I am missing is a good, portable editor for R which has tabs and syntax highlighting, can execute code, has bookmarks and a little project file management facility pretty much like Tinn-R has those. I like Tinn-R but it seems like there is only a very old version of
2006 Apr 21
4
Considering port of SAS application to R
Hi there!
I am considering to port a SAS application to R and I would like to hear your opinion if you think this is possible and worthwhile. SAS is mainly used to do data management and then to do some aggregations and simple computations on the data and to output a modified data set. The main problem I see is the size of the data file. As I have no access to SAS yet I cannot give real details
2008 Feb 26
2
Custom LaTeX tables
Hello,
I am very happy that I have Sweave and R to write my
papers. But I still have to do some tables by hand
since I have not found out how I can customize the
latex tables produced by R further (I mainly use
xtable()). Like for instance, I have a table which
needs an extra row every few rows as a group header
and sometimes I want some extra horizontal lines in
the table and also a multicolumn
2008 Oct 22
3
retrieving matrix elements by giving pairs of row AND column numbers?
Hi,
this is probably a very trivial question but I can't figure out the right terms to find the solution in the list archive.
I have a matrix or a data.frame or the like:
> m <- matrix(ncol=3,seq(1,9))
> m
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
and now I wonder if one can provide somehow two vectors, one containing row numbers, the other
2019 Aug 04
6
gfortran 9 quantreg bug
I?d like to solicit some advice on a debugging problem I have in the quantreg package.
Kurt and Brian have reported to me that on Debian machines with gfortran 9
library(quantreg)
f = summary(rq(foodexp ~ income, data = engel, tau = 1:4/5))
plot(f)
fails because summary() produces bogus estimates of the coefficient bounds.
This example has been around in my R package from the earliest days of R,
2006 Dec 05
1
summaryBy(): Is it the best option?
Hi,
since I have quite large tables and the processing
takes quite a while I am
curious if I can improve the performance of this
aggregation somehow: At the
moment I am using summaryBy from the doBy package
under R 2.4.0, Win2K.
summaryBy(soc_s6aq5 + soc_s6aq7 + soc_s6aq9 +
soc_s6aq11 ~ hh +
comgroup,soc6a,postfix=c("","","",""),FUN=sum,
na.rm=T)
The
2008 Mar 13
2
recover masked functions?
Hi,
I have loaded the packages car, memisc, Hmisc and all
of these implement the function recode. The order in
which the packages are loaded depends on the order I
execute my scripts and thus is not always the same and
the syntax of the recode function changes with the
package.
Is there any way to call specificly the memisc recode
function?
Or maybe it's better to detach all packages first
2004 Jul 19
3
why won't rq draw lines?
I've been trying to draw quantile linear regression lines across a scatterplot of my data using
attach(forrq)
plot(PREGNANT,DAY8,xlab="pregnant EPDS",ylab="postnatal EPDS",cex=.5)
taus <- c(.05,.1,.25,.75,.9,.95)
xx <- seq(min(PREGNANT),max(PREGNANT),100)
for(tau in taus){
f <- coef(rq(DAY8~PREGNANT,tau=tau))
yy <-
2004 Nov 05
1
Error message from vignette strucchange-intro example
Hello,
I am just studying the following example from vignette:
strucchange-intro,
contineousely ending up in an error.
This is the given code:
1. library(strucchange)
2. data(USIncExp)
3. if (!"package:stats" %in% search()) library(ts)
4. USIncExp2 <- window(USIncExp, start = c(1985, 12))
A.Modelling:
coint.res <- residuals(lm(expenditure ~ income, data = USIncExp2))
2010 Oct 10
0
rearrange command in quantreg package
Dear all,
I want to use the "rearrange" command which is based on Chernozhukov et al
paper and is included in the quantreg package. So, I run a quantile
regression in which I included dummy variables for state and years in order
to estimate the respective fixed effects quantile regression. The problems
are the followings:
1. At example that is stated in the help****, I don't
2011 Jan 31
0
Function rearrange (quantreg)
Dear all
How can I obtain the data from the function "rearrange" in package quantreg
More especifically, based on the example below (available in the help of the
rearrange function), how can I access the data generated by
"rearrange(zp)" ?
data(engel)
z <- rq(foodexp ~ income, tau = -1,data =engel)
zp <-
2009 Jan 19
1
conditional weighted quintiles
Dear All,
I am economist and working on poverty / income inequality. I need descriptive
statitics like the ratio of education expentitures between different income
quintiles where each household has a different weight. After a bit of
google search I found 'Hmisc' and 'quantreg' libraries for weighted quantiles.
The problem is that these packages give me only weighted quintiles;