On 01/31/2012 11:34 PM, swertie wrote:
Hello!
I have a dataset with monthly temperatures for 4 different years and I would
like to test if they are significantly different between the years. As I
collected the data for different sites I wondered if there were some
possibility to perform the calc
Is Computable General Equilibrium modelling(CGE modelling) possible
in R Please help as the software which does it is very costly
especially for the developing countries scholars like me
Thanking You
Ayanendu Sanyal
Institute for Social and Economic Change
Nagarbhavi
Bangalore
India
PIN 56007
On Tue, Jan 31, 2012 at 01:59:13PM -0500, Val wrote:
> Hi petr,
>
> >Can the required density be understood as a piecewise
> >linear function going through 4 or 5 given points?
>
> That is my problem. The function should be nonlinear. However, we can break
> it down to the first 3 or 4 points cou
On 02/01/2012 04:31 AM, Kevin Burton wrote:
There must be a trick because I am not seeing a legend:
...
Hi Kevin,
Try calling it like this:
color.legend(-0.4,0.35,0.37,0.4,rect.col=colors,
legend=1:11,align="rb")
I just looked at the plot limits, par("usr"), and worked out where to
put it.
Hi,
It looks like you need scalebox inside the sidewaystable environment. If you
must use scalebox, one solution is to use floating=FALSE when you call
print.xtable, and insert the table environment directly in LaTeX, like this:
\begin{sidewaystable}[ht]
\scalebox{0.7}{
<>=
print(outfile, inclu
Hi Andy,
On Tuesday, January 31, 2012 08:44:13 AM Liaw, Andy wrote:
> I'm not exactly sure if this is a problem with indexing by name; i.e., is
> the following behavior by design? The problem is that names or dimnames
> that are empty seem to be treated differently, and one can't index by them:
>
On Tue, Jan 31, 2012 at 01:59:13PM -0500, Val wrote:
> Hi petr,
>
> >Can the required density be understood as a piecewise
> >linear function going through 4 or 5 given points?
>
> That is my problem. The function should be nonlinear. However, we can break
> it down to the first 3 or 4 points cou
Michael Wither wrote on 01/28/2012 03:18:29
PM:
> [image removed]
>
> Re: [R] R extracting regression coefficients from multiple
> regressions using lapply command
>
> Michael Wither
>
> to:
>
> Jean V Adams
>
> 01/28/2012 03:18 PM
>
> Hi, this code is actually great (much better than a
Dear all,
I am doing unblanced longitudinal analysis (the number of individuals
declines with time). I want to consider the decreasing cases with time
by adding a weight which assumes a different variance function at each
time.
However, if i run 'm1' (shown below), the error message ' weights mus
Sally Luo gmail.com> writes:
>
> Dear R helpers,
>
> I need to estimate a probit model with box constraints placed on several of
> the model parameters. I have the following two questions:
>
> 1) How are the standard errors calclulated in glm
> (family=binomial(link="probit")? I ran a typica
Yes.
For a simple start try:
help(optim)
If you need a more complicated algorithm look into the 'neldermead' package.
HTH,
-Steve
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Partha Sinha
Sent: Wednesday, February 01, 2012 1:31
> Can optimisation (simplex etc) be done through R?
>
Try the CRAN task view on optimisation at, for example,
'http://finzi.psych.upenn.edu/views/Optimization.html
***
This email and any attachments are confidential. Any use...{{
I'm looking for an extension of kappa to measure agreement among multiple
raters when there can be more than one response per subject. For example,
say a group of doctors assign diseases to patients. Each patient will be
assigned one to many diseases, and the number of doctors assigning diseases
Hi Marc,
That the code I wrote initially is over engineered is certainly possible. Of
course, Rui's solution is a reworking of that code. If starting from scratch,
Rui likely would have done something quite different. I focused on Rui's code
because it was complete and was a clear improvement o
Depending on what you want to do with that file, there may be no need to
uncompress
read.table(), e.g., works fine with the compressed version.
Benno
On Feb 1, 2012, at 2:04 AM, Luke Miller wrote:
> Try the bzfile() function instead of unz(). You'll find that you're
> taken to the sa
Dear Bryan,
You could try using spatial techniques to choose the contiguous areas of your
matrices.
> require(spatstat)
> set.seed(1520)
> x <- matrix(rnorm(25), nrow=5, ncol=5,
+ dimnames=list(c("A","B","C","D","E"), c("v","w","x","y","z")))
> x
vw x
Hi,
I have installed R version 2.14 in windows 7 . I want to use
randomForest package. I installed Rtools and MikTex 2.9, but i am not
possible to read description file and also its not possible to build
package. when i give this command in windows R CMD IINSTALL --build
randomForest its shows
Thank you very much! This is the kind of plot I tried to do.
For the statistical models, I am a bit confused between which factors to put
as fixed or random effects. I will have a look at time series models as you
suggested.
swertie
--
View this message in context:
http://r.789695.n4.nabble.co
Dear all,
I have to select 122 stratified random samples from a population of
>3900 cells. I have 41 strata and I have to draw a different number of
samples from them(between 2 and 8).
I have tried to apply the funtion strata following the instruction in
the manual:
strata(dataframe, strata
Dear all,
using an existing random forest, I would like to calculate the proximity
for a new test object, i.e. the similarity between the new object and the
old training objects which were used for building the random forest. I do
not want to build a new random forest based on both old and new obj
Hello,
i have used the code below to estimate the parameters of weibull distribution
and i want to obtain the fisher information
by providing the the next code but i receive errors anytime i try to, what do i
do?
by the way is my replication correct and is it placed at the right position for
rep
You should be able to use the Rgui menu to install packages.
Andy
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Niratha
> Sent: Wednesday, February 01, 2012 5:16 AM
> To: r-help@r-project.org
> Subject: [R] Random Forest P
There's an alternative, but it may not be any more efficient in time or
memory...
You can run predict() on the training set once, setting nodes=TRUE. That will
give you a n by ntree matrix of which node of which tree the data point falls
in. For any new data, you would run predict() with node
Hi R users,
is there any possibilty that a while loop is working like that:
z <- c(0,1,2,3,4,5,6,7,8,9)
r <- 7
while(w == T) {
for ( i in 1:10 ){
w <- r == z[i]
print(w)
}
}
The loop should stop if w == TRUE
best regards
--
View this mes
Hi Petr,
Thank you very much. It looks we are almost there.
#an example, use a function approximating your graphs
* f <- function(x) { 0.7 - 1.25*((x - 1)^2 - 0.4)^2 }
f <- function(x) { 0.2 - 1.5*((x - 1)^2 - 0.1)^2 }
#plot function f(x)
# x <- seq(0, 2, length=51)
x <- seq(0.01, 1.75, len
You are combining too many loop constructs: perhaps you just want to
use for and break.
Of course, in your case it's much faster to write which(r == z) or
which.min(r == z)
Michael
On Wed, Feb 1, 2012 at 10:55 AM, Chris82 wrote:
> Hi R users,
>
> is there any possibilty that a while loop is wor
Le mercredi 01 février 2012 à 07:55 -0800, Chris82 a écrit :
> Hi R users,
>
> is there any possibilty that a while loop is working like that:
>
> z <- c(0,1,2,3,4,5,6,7,8,9)
> r <- 7
>
>while(w == T) {
> for ( i in 1:10 ){
> w <- r == z[i]
> print(w)
On 01-02-2012, at 16:55, Chris82 wrote:
> Hi R users,
>
> is there any possibilty that a while loop is working like that:
>
> z <- c(0,1,2,3,4,5,6,7,8,9)
> r <- 7
>
> while(w == T) {
>for ( i in 1:10 ){
>w <- r == z[i]
>print(w)
>}
> }
>
>
Thanks to both.
This is just a simple example. In real I have two vectors with different
lengths.
The code consists of two for loops for r and z. The main problem is the
computational time, so I try to stop the loop if w is TRUE for the first
time.
First I tried to use the command "stop" in comb
Hi Ista,
When you write a package, you have to anticipate what users will throw at the
code. I can insist that users only input matriices where none of the column
names are empty, but that's not what I wish to impose on the users. I can add
the name if it's empty, but as a user I don't want a
No. The while loop is only tested after the for loop has completed. Use debug
to understand this if it doesn't make sense to you.
---
Jeff NewmillerThe . . Go Live...
DCN:Basi
I guess you want something like
w=F
z <- c(0,1,2,3,4,5,6,7,8,9)
r <- 7
while(w == F) {
for ( i in 1:10 ){
w <- r == z[i]
print(w)
}
}
But this loop will run forever. The condition for "while" is checked
when i jumps from 10 to 1. At that momen
Dear All,
I am looking for a function to get lagged dates from an input vector of
dates, whereas the lag is specified by another vector. Each date is lagged
by a different number of days. (specified in vector n)
Example:
input <- as.Date( c( "2002-01-30", "2002-02-24", "2002-03-31") )
n
input + n
Michael
On Wed, Feb 1, 2012 at 11:45 AM, RNoob wrote:
> Dear All,
>
> I am looking for a function to get lagged dates from an input vector of
> dates, whereas the lag is specified by another vector. Each date is lagged
> by a different number of days. (specified in vector n)
>
> Exampl
Not the best way but it seems to work:
do.call(c, lapply(1:length(n), function(i) input[i] + n[i]))
Also, the lubridate <
http://cran.r-project.org/web/packages/lubridate/index.html> package might
be useful.
HTH,
Jorge.-
On Wed, Feb 1, 2012 at 11:45 AM, RNoob <> wrote:
> Dear All,
>
> I am lo
Hello, I'm trying to install the package metRology from SourceForge. I save
the zip file metRology_0.9-06.tar.gz to my Windows 7 machine, and try to
install the package using the RGUI: Packages > Install packages from local zip
files > metRology_0.9-06.tar.gz. There's no .zip extension, but
On 12-02-01 12:07 PM, Prew, Paul wrote:
Hello, I'm trying to install the package metRology from SourceForge. I save the zip
file metRology_0.9-06.tar.gz to my Windows 7 machine, and try to install the package
using the RGUI: Packages> Install packages from local zip files>
metRology_0.9-0
On Wed, Feb 01, 2012 at 11:01:21AM -0500, Val wrote:
> Hi Petr,
>
> Thank you very much. It looks we are almost there.
>
>
> #an example, use a function approximating your graphs
> * f <- function(x) { 0.7 - 1.25*((x - 1)^2 - 0.4)^2 }
> f <- function(x) { 0.2 - 1.5*((x - 1)^2 - 0.1)^2 }
>
>
On 01-02-2012, at 17:32, Chris82 wrote:
> Thanks to both.
>
> This is just a simple example. In real I have two vectors with different
> lengths.
> The code consists of two for loops for r and z. The main problem is the
> computational time, so I try to stop the loop if w is TRUE for the first
The follwing is a code snippet from a power simulation
program that I'm using:
estbeta<-fixef(fitmodel)
sdebeta<-sqrt(diag(vcov(fitmodel)))
for(l in 1:betasize)
{
cibeta<-estbeta[l]-sgnbeta[l]*z1score*sdebeta[l]
if(beta[l]*cibeta>0) powaprox[[l]]<-powaprox[[l]]+1
Hi,
I am trying to use WinBUGS using R, but i am having some problems using
bugs function:
out <- bugs(data = win.data, inits = inits, parameters.to.save = params,
model.file = "model.txt",
n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni, debug = TRUE, DIC =
TRUE, working.directory = g
Hi Henrik,
That is exactly what I was looking for. I worked great. Many thanks.
By the way it doesn't seem to be able to do batch mode. I guess I will
have to iterate through. But thats ok.
John
On 1/31/12, Henrik Bengtsson wrote:
> I may be wrong, but I don't think unz() handles bz2 files - o
Thanks Ista.
Your suggestion works.
When I make the option floating=F, the caption no longer appears in the Tex
code generated by xtable. If I had \caption {Title} in the code, it does
not seem to work.
\documentclass[11pt]{report}
\usepackage{rotating}
%\usepackage[counterclockwise]{rotating}
Hi Petr,
Thank you very much . I will let you know my progress!
Do you think that sampling from the traingular distribution will also be
good enough? Will it provides similar results?
Val
On Wed, Feb 1, 2012 at 12:48 PM, Petr Savicky wrote:
> On Wed, Feb 01, 2012 at 11:01:21AM -0500, Val
I'm looking for a function in R that extends kappa to multiple raters when
there is more than one response per subject. For example, say a group of
doctors have to assign diseases to patients. Each patient will be assigned
one to many diseases, and the number of doctors assigning diseases to any
On Wed, Feb 1, 2012 at 11:18 PM, Elena Guijarro
wrote:
> Dear all,
>
> I have to select 122 stratified random samples from a population of
> >3900 cells. I have 41 strata and I have to draw a different number of
> samples from them(between 2 and 8).
>
> I have tried to apply the funtion strata f
Ken Rice and I will give a course on advanced R programming in two
locations this summer.
1. In Edinburgh, June 13-15 (the week before the International
Conference in Quantitative Genetics). See http://www.eisg2012.org.uk/
2. In Seattle, July 23-25, as part of the Summer Institute in
Statistical
On 01.02.2012 18:43, Pauline Pantoja wrote:
Hi,
I am trying to use WinBUGS using R, but i am having some problems using
bugs function:
out<- bugs(data = win.data, inits = inits, parameters.to.save = params,
model.file = "model.txt",
n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni,
Hi,
In order to produce an autoregression where only certain lags are allowed,
specified in advance (e.g. c(1,2,5) ), I have found it necessary to look
beyond the standard [ar] function, thankfully discovering the [FitAR]
package, wherein the [FitARp] function provided exactly that capability.
How
hi,
I have a dataset with more than 15000 data and would like to calculate the mean
for only those that is bigger than and equal to 75 for all variables
(x,y,z1,z2,u,v,w z1 and z2).
my dataset is (for example) as follows :
x y z1 z2 u v w1 w2
95 83 57 50 59 39 90 48
100 92 83 82 93 92 50 50
39 4
Hi,
I have a question related to the newest version of ggplot2 (0.9.0). I
just updated this morning and from CRAN it looks like the Mac version
is the only one at 0.9.0 as of right now.
http://cran.r-project.org/web/packages/ggplot2/index.html
Anyway, I was in the midst of a project where I was
I'm very sorry for double posting! My r-help setting Receive your own
posts to the list? is set to Yes, and Mail delivery is Enabled. Yet I did
not get a copy of my post (this message is a reply from my sent mail). I
only learned of the double posting when I found it copied in an r-help
archive.
I'm not entirely sure what you mean, but it's likely one of these:
apply(data, 2, function(x) mean(x[x>75]))
mean(data[ apply(data,1, function(x) all(x > 75), ])
mean(data[data>75])
Three questions to give more concrete help:
i) Is your data set stored as a matrix or a data.frame
ii) What are yo
On Feb 1, 2012, at 3:13 PM, Luk Arbuckle wrote:
I'm very sorry for double posting! My r-help setting Receive your own
posts to the list? is set to Yes, and Mail delivery is Enabled. Yet
I did
not get a copy of my post (this message is a reply from my sent
mail). I
only learned of the do
Dear R-helpers,
I have an ANCOVA with a significant effect of the factor, which has
three levels. I wish to determine which of the levels are different
from each other but, because my model was fitted with lm(), I cannot
use TukeyHSD.
For some reason, I get different results (no significant effec
Thanks David, but those are not "multi-response" versions of the kappa.
Extensions to multiple raters are common and well known. I am hoping
someone familiar with multiple response extensions of kappa might see my
post and be able to help.
As I said, my search on cran has failed. I tried all th
Searching on "multiple raters attributes" at the same site brings up
http://finzi.psych.upenn.edu/R/library/smacof/doc/smacof.pdf (by Jan
De Leeuw)
Which has as one example multiple raters scoring "different
breads".
On Feb 1, 2012, at 4:41 PM, Luk Arbuckle wrote:
> Thanks David,
On Feb 1, 2012, at 4:34 PM, Mark Na wrote:
Dear R-helpers,
I have an ANCOVA with a significant effect of the factor, which has
three levels. I wish to determine which of the levels are different
from each other but, because my model was fitted with lm(), I cannot
use TukeyHSD.
For some reason
Hello all,
## I am trying to convert some year and month data into a single
variable that has a date format so I can plot a proper x axis.
## I've made a few tries at this and search around but I haven't found
anything. I am looking for something of the format "%Y-%m"
## A data.frame
df <- data.f
I'm needing to remove the R-squared , and put this in a vector. It's the same
that I do with the Beta or alfa in a linear regression:
beta <- vector() ## beta
for (i in 1:ncol(ret)){
beta[i] <- summary(lm((ret[,i] - ret.selic.ibov[,1]) ~ rmrf[,1] +
max[,1]))*$coef[[2]]*
}
So, I need
I installed R 2.14.1 on a OSX 10.7.2 computer using MacPorts. If I fire up
R on a terminal, this very simple session gives me errors. I attach
sessionInfo() details as well. In addition to the warnings, I also do not
get any plots on the X11 window after the warnings. So one cannot just
ignore the
?summary.lm
suggests that you can use $r.squared or $adj.r.squared. (Look under value)
Two style notes: preallocate your beta vector (don't grow it
dynamically like you are doing now) and it's generally a little safer
to use summary()[["r.squared"]] than the dollar sign notation.
(Though it w
On Wed, Feb 1, 2012 at 5:26 PM, Sam Albers wrote:
> Hello all,
>
> ## I am trying to convert some year and month data into a single
> variable that has a date format so I can plot a proper x axis.
> ## I've made a few tries at this and search around but I haven't found
> anything. I am looking for
I am no expert on nls() but since I haven't seen any replies to your
post, I'll chip in:
(1) I am mystified as to why nls() is giving that error about a
"singular" (???)
gradient.
(2) That being said, I think your parameterisation of the objective function
is a bit flaky. I would use
Hi,
Until recently I was using the knncat classifier function of
knncat on an old computer (2.12, Mac OS X 10.4), and
everything worked great.
However, now that I have updated to R 2.14.1 (on Mac OS X
10.7), knncat seems broken. Problems:
1. It seems to output verbose output by default,
Hello,
I'm using range do define boundaries for a linear model, so the line I
graph is only graphed for the range of data. There are NAs in the
data, but I dont remember this being a problem before. I typed
na.action=na.omit anyway, which has usually solved any NA issues in
the past. Any idea why R
Hi Simon,
Thanks for your response. I am now running mgcv 1.7-13 on R-2.14. Having fixed
this error, I now encounter the following when fitting this model
Error in qr.qty(qrx, yn) : 'qr' and 'y' must have the same number of rows
Calls: bam -> bgam.fit -> qr.update -> qr.qty -> qr.qty
bam(cbind
I'm struggling with time zone version when expressed as hours offset from GMT.
Can anyone confirm that the behaviour below is incorrect? It seems that the GMT
offsets are backwards:
> format(as.POSIXct("2011-05-23 17:23:00",
> tz="Europe/London"),tz="America/New_York",usetz=T)
[1] "2011-05-23
Hi Colin,
You should always check the help for your function:
?range says:
range(..., na.rm = FALSE)
Arguments:
...: any ‘numeric’ or character objects.
na.rm: logical, indicating if ‘NA’'s should be omitted.
So for example:
> x <- c(1, 2, NA, 3)
> range(x)
[1] NA NA
> range(x, na
range() is not affected by by options("na.action"). Use
the argument na.rm=TRUE. For plotting purposes finite=TRUE
is nice, as it skips +-Inf as well.
> range(c(NA, 1, 2, Inf))
[1] NA NA
> range(c(NA, 1, 2, Inf), na.rm=TRUE)
[1] 1 Inf
> range(c(NA, 1, 2, Inf), finite=TRUE)
[1] 1 2
Dear users,
I am importing a csv file whose first row is a single value that I need to
capture in a variable.
infile<-file.choose()
in<-read.csv( infile, header=FALSE)
single.value<-as.character(in[1,1]) # fine
Now I need to take rows 3 and on as the data
df<-in[3:dim(in)[1],]
But row 2
Although interesting, Dave, this doesn't fit my problem. I want to measure
the percentage agreement corrected for chance using an extension of kappa.
The example data presented in the paper you linked to is considering an
ordinal measure (ranked preference), whereas I'm looking to measure
correla
Hi James,
There were a few problems with the 0.9.0 version, which is why it was
pulled from CRAN. I'd recommend re-installing 0.8.9:
install.packages("ggplot2", type = "source")
Hadley
On Wed, Feb 1, 2012 at 2:10 PM, J Toll wrote:
> Hi,
>
> I have a question related to the newest version of gg
On Feb 1, 2012, at 10:21 PM, jjap wrote:
Dear users,
I am importing a csv file whose first row is a single value that I
need to
capture in a variable.
infile<-file.choose()
in<-read.csv( infile, header=FALSE)
single.value<-as.character(in[1,1]) # fine
Now I need to take rows 3 and on as
On Wed, Feb 1, 2012 at 9:48 PM, Hadley Wickham wrote:
> Hi James,
>
> There were a few problems with the 0.9.0 version, which is why it was
> pulled from CRAN. I'd recommend re-installing 0.8.9:
> install.packages("ggplot2", type = "source")
>
> Hadley
Hadley,
Thanks for your reply. I went ahe
Hi All,
I have a very (very) large tab-delimited text file without headers. There
are only 8 columns and millions of rows. I want to make numerous pieces of
this file by sub-setting it for individual stations. Station is given as in
the first column. I am trying to learn and use sqldf package for
What I want to do is create a horizontal bar chart matrix for a set of data
that have a common set of variables (e.g., % of As, % of Bs, etc.) listed on
the Y-axis and groups (e.g., Classes) on the X-axis. The key here is that the
bars for each individual class plot are "centered" rather than le
I am using the method to sink the output. However, it can only suppress
'user's initial regression estimate
' and still display the following sentence
'> Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27'
I am just wondering is there any way that we can also suppress this one?
Because I
v1<-c("a","b","c","d")
v2<-c("a","b","e")
v3<-c("a","f","g")
I want to get the intersection of v1,v2,v3,ie "a"
How can I do then?
What I know is only for 2 vectors via "intersect" function,but don't know how
to deal with multiple vectors.
Many thanks
[[alternative HTML versio
Should has nothing to do with it. That is the way the Olsen tz database works.
See en.wikipedia.org/wiki/Tz_database.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
80 matches
Mail list logo