Displaying 20 results from an estimated 1000 matches similar to: "two density curves in one plot?"
2006 Aug 25
1
Plot y ~ x under condition of variable a and b [Broadcast ]
It's the "|source" in your formula that tells lattice to separate them.
If you drop that, you'll get all points without S and P distinguished at
all. If you add a groups argument, you should get them presented with
different colors/symbols/etc. depending on your trellis settings (warning:
untested code):
par.plot(lnvol~lnden, groups =
2006 Nov 26
1
problem loading package Hmisc
Hi,
I installed the package Hmisc with the command
install.packages("Hmisc") without errors. When I try to load the
library with command library(Hmisc) I get the error
> library(Hmisc)
Error in library(Hmisc) : there is no package called 'Hmisc'
> version
_
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386,
2006 Jun 14
3
A question about stepwise procedures: step function
Dear all,
I tried to use "step" function to do model selection, but I got an error massage. What I don't understand is that data as data.frame worked well for my other programs, how come I cannot make it run this time. Could you please tell me how I can fix it?
***************************************************************************************************
2006 Sep 27
2
Histogram
Dear all,
I want to design a histogram and I need to have the frequency at certain
points. For example I have the following 2 columns:
*X Y*
0.1 25
0.4 22
0.45 11
0.55 21
I want the chart to have 4 columns. First column is from 0.0-0.1 (on X) and
frequency is 25. Next colum is wider and form 0.1-0.4 with 22 frequency.
Next column is narrow with 11 frequency and the last column is
2006 Aug 23
1
covariance matrix of predictions
Hi !
I am trying to get at the covariance of the predictions of a linear model. Suppose the we have:
> x<-runif(1000)
> y<-2 + 25x*x +rnorm(1000)
> lm1 <-lm(y~x, data = data.frame(y = y, x=x))
> x.pred <-runif(10)
> y.hat <- predict(lm1, newdata = data.frame(x=x.pred))
I was wondering how to get an estimate of the covariance of y.hat which would be a 10 x 10
2006 Sep 30
3
Textmate project drawer: is there a Windows alternative?
I was reading about the project drawer feature in Textmate, which is Mac
only.
Is there a similar feature in a Windows based text editor that works with R.
This feature sounds really useful.
Thanks,
Graham
[[alternative HTML version deleted]]
2006 Oct 27
2
Multivariate regression
Hi,
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like to perform a linear regression taking
into consideration the covariance structure of Y within each unit - this
would be represented by a specified matrix V (k x k), assumed to be the same
across units. How do I use "lm" to do this?
One approach that I was thinking of
2006 Sep 29
6
List-manipulation
Hi,
Sorry for the question, I know it should be basic knowledge but I'm
struggling for two hours now.
How do I select only the first entry of each list member and ignore the
rest?
So for
> $"121_at"
> -113691170
> $"1255_g_at"
> 42231151
> $"1316_at"
> 35472685 35472588
> $"1320_at"
> -88003869
2006 Aug 04
2
plotting picture data
Hi R users
I have a dataset which represents points that are market by patients as the
source of pain.
Basically the patients indicates by a cross on a chest pictures where he/she
thinks is the
source of pain. The data was then digitalized by divinding the chest into
small squares and each
square was give value 1 if it was the center 2 if it was touched by the
markings and 3 if it was not
2006 Jun 14
2
Saving R graphics with version 2.3.1
HI !
I?ve installed the latest R version (2.3.1) and I?ve had problems to
save my graphics as JPEG, PNG and the others available formats.
R saves the file with no extension. Then, I have to open this file
using an image visualizer and save it as PNG, for instance.
Previous R versions work without problems.
Has everyone had a similar problem?
Is it a bug of R 2.3.1?
Thanks in advance.
Ilka
2006 Aug 26
1
Implementing EM Algorithm in R!
Hi All,
I need some help in how one can implement maximumlikelihood estimation for
models with discrete hidden variables in EM in R.
Regards
[[alternative HTML version deleted]]
2006 Sep 26
2
creation of new variables
Hello All,
I have 8 variables named
a b c d e f g h
I need to create four variables from these 8 vraibles in R.
the new variables are ab,cd,ef,gh.
Can anyone pleas help me
thanks,
Pratap
---------------------------------
[[alternative HTML version deleted]]
2007 Oct 29
3
using survfit
hie
when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example
n=20
n1=n/2
n2=n/4
a11=4;a12=4 ;a21=4 ;a22=4
t1<-array(1,c(n1))
t2<-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
2008 Jul 25
2
graphing regression coefficients and standard errors
Hello,
I am interested in plotting my regression analysis
results(regression coefficients and standard errors obtained through OLS and
Tobit models)
in the form of graphs.What is the best way to accomplish this? Thanks.
Murali Kuchibhotla
[[alternative HTML version deleted]]
2008 Jul 25
3
Maximization under constraits
I''m looking for a R function which can maximise this logliklihood function,
under the constraits a>0 e b>0
f<-function(param){
a<-param[1]
b <-param[2]
log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi
))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)))))}
I''ve tried maxlik constrOptim e donlp2 but without success.
Thanks so
2006 Sep 20
8
Statitics Textbook - any recommendation?
I would like to buy a basic statistics book (experimental design,
sampling, ANOVA, regression, etc.) with examples in R. Or download it
in PDF or html format.
I went to the CRAN contributed documentation, but there were only R
textbooks, that is, textbooks where R is the focus, not the
statistics. And I would like to find the opposite.
Other text I am trying to find is multivariate data
2008 Dec 06
1
Kaplan-Meier function from survfit
Hi All,
Please pardon me if I am missing something obvious here. How do I get
the Kaplan-Meier estimate function that is created by survfit and
plotted by the code.
fit <- survfit(Surv(time, status) , data=aml)
plot(fit)
That is, I need a function that will give me the survival estimate at
a given time: \hat{S}(t).
Thanks in advance.
Ritwik Sinha
ritwik.sinha at gmail.com | +12033042111 |
2011 Feb 11
2
fitdistr question
Hello,
I tried to fit a poisson distribution but looking at the function
fitdistr() it does not optimize lambda but simply estimates the mean
of the data and returns it as lambda. I'm a bit confused because I was
expecting an optimization of this parameter to gain a good fit...
If I would use mle() of stats4 package or mle2() of bbmle package, I
would have to write the function by myself
2011 Feb 21
2
Console output
Hi there,
I though there has been a possibility to force the output on the
console with one element per line. Instead of this:
> 1:10
[1] 1 2 3 4 5 6 7 8 9 10
something like this
> 1:10
[1] 1
[2] 2
[3] 3
[4] 4
[5] 5
[6] 6
[7] 7
[8] 8
[9] 9
[10] 10
Can anybody help?
Antje
2008 Dec 05
6
levels update
Hello,
I hope this question is not too stupid. I would like to know how to update
levels after subsetting data from a data.frame.
df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4))
names(df) <- c("X1","X2","X3")
my.sub <- subset(df, X1 == "a" | X1 == "b")