On 11/12/13 02:49, Dereje Fentie wrote:
Is there an r package out there that solves for pure strategy* Nash
equilibrium of a two-person game*? A search for Nash equilibrium in r
provides a link to the *GNE* package which solves for the Generalized Nash
equilibrium. But what I would like to solve
The serialno represents each individual in the data set.The total
count of the serialno will represent the whole sample
I want to do a graph to compare the total data (serialno) vs each of
the remaining five variables yearly. i.e to show the total data
(serialno) vs available data for one of the
I have a block of code:
window<-5
start<-3
n<-1
seq1 <- seq(1:40)
mat<-matrix(seq1,40)
while(1+window<=length(mat[,1]))
{
kd<-matrix(as.integer(mat[n:(n+window-1),1]))
Sys.sleep(0.2)
plot(kd,col="blue",xlab="Rohdaten",ylab="values",xlim=c(start+n,start+n+window-1)
)
n<-n+1
}
I have thi
RTFM!!! :-)
The help explicitly says "The default contrasts are set internally to
(contr.sum, contr.poly) ".
Set
options(contrasts=c("contr.sum","contr.poly"))
before your call to lm() and "atest" will agree with "aptest" all down
the line.
cheers,
Rolf Turner
On 11/08/
On 11/13/2013 07:20 PM, Keniajin Wambui wrote:
The serialno represents each individual in the data set.The total
count of the serialno will represent the whole sample
I want to do a graph to compare the total data (serialno) vs each of
the remaining five variables yearly. i.e to show the total
Dear listeners,
in order to analyze a dataset, which includes more than 30k records, I'm
using a general GAMM like y~s(x)+s(y)+z+e with a underlying normal
distribution. Unfortunately, I have some problems with over- and
underfittings in smooth-functions at the same time.
In general there is the
Dear R-help,
The negative binomial distribution has several different
parameterisations, but I can't seem to figure out what the exact one
used in mgcv's negbin family is? negbin() requires a theta argument,
but its not clear anywhere in the documentation (that I can find), how
this parameter shou
On 13/11/2013 09:38, Mark Payne wrote:
Dear R-help,
The negative binomial distribution has several different
parameterisations, but I can't seem to figure out what the exact one
used in mgcv's negbin family is? negbin() requires a theta argument,
but its not clear anywhere in the documentation (
Hi all,
I have spatial field created with grf and I was wondering if I can sample in
lines, something that can resemble sampling outdoors at the streets.
Random sampling looks to far of what I want to have.
there is in geodata package the sample.geodata but this looks like to be random
samples.
Dear all,
my data looks the following:
df <- data.frame (experiment=c("E1","E2","E3","E4"), mean = c(3,4,5,6),
stdev=c(0.1,0.1,0.05,0.2), method = c("STD","STD", "FP", "FP"), enzyme =c
("T","T/L","T","T/L"), denaturation=c("U","U","0.05%RG", "0.1%RG"))
I would like to make a bar plot wit
Hello everyone,
I got an issue with calling predict.coxph.penal inside a function.
Regarding the context: My original problem is that I wrote a function that
uses predict.coxph and survfit(model) to predict
a lot of survival-curves using only the basis-curves for the strata (as
delivered
Works for me:
predicting_function(fit2,test1)
1 2 3 4 5 6 7
-1.0481141 0.1495946 0.4492597 0.4492597 0.9982492 -0.4991246 -0.4991246
Best
Simon
On 13 Nov 2013, at 15:46, julian.bo...@elitepartner.de wrote:
> Hello everyone,
>
Or,
f3 <- function (dat1) {
i <- dat1$Event_Occurence == 1
split(dat1$Week[i], dat1$ID[i])
}
in addition to the previously mentioned
f1 <- function(dat1) {
with(dat1,tapply(as.logical(Event_Occurence),ID,FUN=which ))
}
f2 <- function(dat1){
lapply(split(dat1,dat1$ID),function(x)
var(y) = mu + mu^2/theta where E(y) = mu.
best,
Simon
On 13/11/13 10:38, Mark Payne wrote:
Dear R-help,
The negative binomial distribution has several different
parameterisations, but I can't seem to figure out what the exact one
used in mgcv's negbin family is? negbin() requires a theta argum
Hi
I found this paper http://cs.stanford.edu/people/jure/pubs/dpln-kdd08.pdf that
models the DPLN distribution as in equation 8. I implemented this in R but
cannot get the same curve as in Figure 4. can you please check if my code below
is correct: e.g. is the use of pnorm() correct here?
d
On Nov 13, 2013, at 12:24 AM, Baro wrote:
> I have a block of code:
>
> window<-5
> start<-3
> n<-1
>
> seq1 <- seq(1:40)
> mat<-matrix(seq1,40)
>
>
> while(1+window<=length(mat[,1]))
> {
> kd<-matrix(as.integer(mat[n:(n+window-1),1]))
> Sys.sleep(0.2)
>
> plot(kd,col="blue",xlab="Rohdaten
Hi R Expert Community,
My question: What is the difference between Mean Decrease Accuracy produced by
importance(foo) vs foo$importance in a Random Forest Model?
I ran a Random Forest classification model where the classifier is binary. I
stored the model in object FOREST_model. I than ran impo
The expression has b[1] and b[2] while start has b[2] and b[3].
The expression needs a different form, for example:
# fit<-nlrob(y ~ x1 / (1+ b[1]*x2^b[2]),data = xx, start =
# list(b[2],b[3]))
fit<-nlrob(y ~ x1 / (1+ b1*x2^b2),data = xx, start =
list(b1=b[2],b2=b[3]))
This "works", th
Dear all,
I have a geom_boxplot where I have the boxes colored according to a factor. The
color scale given is very lovely and colorful, but I need it in grayscale. how
do I change this?
I also am worried that the grayscale may be too similar (black/white is also
not an option as in my real dat
Hello,
I am noticing different behavior with respect to .First when working in
Terminal or working with the R gui on Mac OSX, and I am wondering if
someone might clarify for me the intention behind this. In both cases, I
am running 3.0.2 on the same machine.
In my ~/.Rprofile I have a function .
Dear R experts,
I was wondering how I could do a fit (say minimum chi2) to a 1D data with error
bars. I searched quite a lot on the web, found out about the fitdistr()
function in MASS, etc., but none of the things I found gives what I am really
looking for. Perhaps I do not exactly know the pr
Dear community,
I almost tried for 3 days now to install rJava and package FSelector on my
Linux machine but couldn't do so.
I searched all the forums and tried some tricks ... but unfortunately
couldn't find any solution.
First of all I did try to install rJava in my rkward wi
Hi,
I would like to know how to handle truncated data.
My intend is to have the survival curve of a software fault in order
to have some information
about fault lifespan.
I have some observations of a software system between 2004 and 2010.
The system was first released in 1994.
The event consider
Hi Sven,
May be this helps:
If you look into ?simplex.object
"
solved This indicates whether the problem was solved. A value of
‘-1’ indicates that no feasible solution could be found. A
value of ‘0’ that the maximum number of iterations was
reached without ter
Looks like there are typos in equation 8 of
http://cs.stanford.edu/people/jure/pubs/dpln-kdd08.pdf (expo2 doesn't depend
on 'v') or equation 9 of http://www.math.uvic.ca/faculty/reed/dPlN.3.pdf ('a'
is not specified).
Dave
On Nov 13, 2013, at 11:43 AM, "b. alzahrani"
wrote:
>
> Hi
>
> I
I have finally decided that I will learn R and learn it very well. For now I am
using a program that a friend of mine developed to do some advanced statistical
analyses. I downloaded RStudio to my machine. [Perhaps RStudio is not the best
platform to work from - I have heard that Rattle is sort
I am hoping there are other users of the kernlab package in R who will be able
to solve a puzzle. In the past, I've used the relevance vector machine engine
(rvm) in kernlab and was pleased to see it use all four cores on my PC (running
Windows 8).
But now it only runs on one core and I can't fi
Hi Katherine,
Check if this works:
fraud_data = data.frame(no_of_frauds = c(1, 2, 4, 6, 7, 9, 10), frequency =
c(3, 1, 7, 11, 13, 1, 4))
fraud_data1 <- rbind(fraud_data,c(11,10))
fun1 <- function(dat) {
sum1 <- 0
for(i in 1:nrow(dat)){
sum1 <- sum1 + dat[i, "frequency"]
dat[i,"frequency"] <-
Type the following into your console window:
install.packages("fortunes")
library(fortunes)
fortune("brain surgery")
(It's not quite apposite, but close enough).
Cheers,
Bert
On Wed, Nov 13, 2013 at 5:57 AM, Zach Feinstein wrote:
> I have finally decided that I will learn R and learn it very
Bert:
Yet another reason I'm a fan of Frank Harrell. Does anyone know when
I get to buy the next edition of Regression Modeling Strategies?
Zach: Check www.coursera.org. They have some nice R-centric classes.
I signed up myself since my own R skills are self-taught. Also
consider investing in s
...Additionally...your set of parameters match none of the curves in figure 4.
I think the ordering of the parameters as listed on the graphs is different
than in the text of the article.
The 'v' parameter controls the location of the 'elbow' and should be near
log(x) in each graph, while the '
On Tue, Nov 12, 2013 at 11:45 AM, umair durrani wrote:
> I am new to R and have already posted this question on stack overflow. The
> problem is that I did not understand the answers as the R documentation
> about the discussed functions (e.g. 'convolve') is quite complicated for a
> newbie like m
This is a great solution! Love the conciseness of your solution. And easy to
understand.
Thanks again.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, November 11, 2013 6:31 PM
To: Lopez, Dan
Subject: Re: [R] Update a variable in a dataframe based on var
I have three media channels where I can push public health information (tv,
radio and newspaper). Any given citizen can be touched by the information
from one, two or three channels (let's ignore for the moment that citizens
might miss the information all together). Hence these sets:
library(sets
On 11/14/2013 01:24 AM, n.hub...@ncmls.ru.nl wrote:
Dear all,
my data looks the following:
df<- data.frame (experiment=c("E1","E2","E3","E4"), mean = c(3,4,5,6), stdev=c(0.1,0.1,0.05,0.2), method = c("STD","STD", "FP", "FP"), enzyme =c
("T","T/L","T","T/L"), denaturation=c("U","U","0.05%RG
On Nov 13, 2013, at 1:35 PM, Stefan Petersson wrote:
> I have three media channels where I can push public health information (tv,
> radio and newspaper). Any given citizen can be touched by the information
> from one, two or three channels (let's ignore for the moment that citizens
> might miss
?filter
perhaps.
-- Bert
On Wed, Nov 13, 2013 at 1:10 PM, Adams, Jean wrote:
> On Tue, Nov 12, 2013 at 11:45 AM, umair durrani
> wrote:
>
>> I am new to R and have already posted this question on stack overflow. The
>> problem is that I did not understand the answers as the R documentation
>>
Dear R-users,
I am wondering why "^" operator alone returns a matrix, when operated on a
data.frame (as opposed to all other arithmetic operators). Here's an example:
DF <- data.frame(x=1:5, y=6:10)
class(DF*DF) # [1] data.frame
class(DF^2) # [1] matrix
I posted here on SO:
http://stackoverfl
Hi!
I need to print a graph that I have in a window. Previously I used:
try(win.print(), silent = TRUE)
if (geterrmessage() != "Error in win.print() : unable to start
device devWindows\n") {
plotFunctiond(screen = FALSE)
dev.off()
but now it is not possible.
Can y
Hi, everyone!
I have a matrix X(n*p) which is n samples from a p-dimensional normal
distribution. Now I want to make the ellipsoid containing (1-α)% of
the probability in the distribution based on Mahalanobis distance:
μ:(x-μ)'Σ^(-1)(x-μ)≤χ2p(α)
where x and Σ is the mean and variance-covar
On 13-11-13 6:00 PM, Arunkumar Srinivasan wrote:
Dear R-users,
I am wondering why "^" operator alone returns a matrix, when operated on a
data.frame (as opposed to all other arithmetic operators). Here's an example:
DF <- data.frame(x=1:5, y=6:10)
class(DF*DF) # [1] data.frame
class(DF^2) # [1
Duncan,
Thank you. What I meant was that "^" is the only *arithmetic operator* to
result in a matrix on operating in a data.frame. I understand it's quite old
code. Also, your explanation makes sense, with the exception of "/" operator, I
suppose (I could be wrong here).
Arun
On Thursday, N
On 13-11-13 6:52 PM, Arunkumar Srinivasan wrote:
Duncan,
Thank you. What I meant was that "^" is the only *arithmetic operator*
to result in a matrix on operating in a data.frame. I understand it's
quite old code. Also, your explanation makes sense, with the exception
of "/" operator, I suppose (
Dan,
Gabor's solution is of course good, but here's a solution that uses only
base R capabilities, and doesn't sort as merge() does. Essentially the
same as A.K.'s, but slightly more general.
tmp1 <- match( paste(T_DF$FY,T_DF$ID) , paste(H_DF$FY,H_DF$ID) )
H_DF$TT[tmp1] <- T_DF$TT
gg <- sqldf("s
Hi,
I have 187 urine cultures which were subjected to culture and microscopy
methods. Video were used to 'verify' the findings. Culture is considered
the gold method. But Microscopy is another method which may be cheaper. I
checked the videos to determine whether bacteria was growing on both the
Dear R help,
I'm using version 1.3.10.12 of the psych package. The help page for fa
says that when calculating factor scores, oblique.scores=FALSE causes
the pattern matrix to be used, and oblique.scores=TRUE causes the
structure matrix to be used. However, when I try it, it seems to be
the other
If you are after adding error bars in a scatter plot; one example is
given below :
#some example data
set.seed(42)
df <- data.frame(x = rep(1:10,each=5), y = rnorm(50))
#calculate mean, min and max for each x-value
library(plyr)
df2 <- ddply(df,.(x),function(df)
c(mean=mean(df$y),min=min(df$y),ma
Don't know if the data will support the result that you want but the
only way to get some sort of answer is to hire a statistician.
ranjan
On Wed, 13 Nov 2013 20:58:30 -0400 Jim Silverton
wrote:
> Hi,
>
>
>
> I have 187 urine cultures which were subjected to culture and microscopy
> methods.
Hi Don,
In cases like:
H_DF <- H_DF[-4,]
tmp1 <- match( paste(T_DF$FY,T_DF$ID) , paste(H_DF$FY,H_DF$ID) )
H_DF$TT[tmp1] <- T_DF$TT
#Error in `[<-.factor`(`*tmp*`, tmp1, value = c(2L, 2L, 2L)) :
Probably, this works:
H_DF$TT[tmp1[!is.na(tmp1)]] <- unique(T_DF$TT)
A.K.
On Wednesday, Novemb
hi
I have a nonlinear regression model with two parameter, i have estimated using
nls in R
and i want to also find the estimate using MM, someone refer me to this
function nlrob
but this is main for only M estimate. can you please help me findout a
function in R for MM nonlinear regression
th
Hi all,
I have a data set which treat missing value as NA and now I need to replace
all these NA's by using number in the same row but different column.
Here is the part of my data:
V1 V2 V3 V4 V5 V6 V7 0 0 0 1.2 0 0 0.259 0 0 12.8 0 23.7 0 8.495 6 0
81.7 0.2 0 20 19.937 0 1.5 60.9 0 0 15.5
Check the gmm package with a weighting matrix equal to the identity.
Best
Simon
On 14 Nov 2013, at 04:37, IZHAK shabsogh wrote:
> hi
>
> I have a nonlinear regression model with two parameter, i have estimated
> using nls in R
> and i want to also find the estimate using MM, someone refer m
52 matches
Mail list logo