May I know how to find the R-squared for robust regression model?
Thank you.
Hock Ann
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Hi,
I have a dataframe column of the form
v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri
Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010")
I need to convert this to datetime form. I did the following..
lapply(v,function(x){strptime(x, "%a %b %d %H:%M:
try:ch
--
for(i in 1:22) {
chrn <- paste("chr",i,sep="")
chrn=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chrn",numrows= )
chrn=MEDIPS.genomeVector(data=chrn, bin_size=50,extend=250)
...
...
write.table(frameschrn.frame500.step250, file="frames.chrn.meth.txt",
sep="\T",
Hello Steve,
You'll need to give more information for people to help you.
1) Is this the first time you installed R? Or was it a working R version
that suddenly started having this problem?
2) Did you try uninstalling this version, downloading a new version,
installing it - and seeing what happen
Is it okay with you?
Reduce("rbind", lapply(lapply(v,function(x){strptime(x, "%a %b %d %H:%M:%OS
%Y")}), as.character))
--
View this message in context:
http://r.789695.n4.nabble.com/Converting-a-dataframe-column-from-string-to-datetime-tp2853709p2869793.html
Sent from the R help mailing list a
On 10/01/2010 09:19 AM, Jeremy Claisse wrote:
Is there a way to create barplots with pairs of bars plotted on 2 different
scales (i.e some bars would be plotted according to the scale on the y-axis
on the left and other bars plotted according to a different scale on the
right axis)?
Hi Jeremy,
I think you want to use as.POSIXct to get the date value:
> v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri
> Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010")
> x <- as.POSIXct(v, format= "%a %b %d %H:%M:%OS %Y")
> x
[1] "2010-02-05 20:00:01 EST" "2010-0
On 10/01/2010 01:01 AM, Filoche wrote:
Hi everyone.
I would like to know if it was possible to insert a plot into another one.
For example I have a plot and I would like to add a smaller plot in the top
right corner.
Hi Phil,
Take a look at the subplot function in TeachingDemos.
Jim
___
Dear R-users,
I successfully installed rtiff on by R installation, but when I tried to
load it, I got:
>local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Error in dyn.load(file, ...) :
unable to load shared library
'C:/PROGRA~1/R
Hi,
I am new to R and trying to plot a time series data with irregular interval.
I was wondering how to read a data of the following format and plot it ?
Time 00:00:00 00:05:00 00:10:00 00:15:00
00:20:00 00:30:00 01:00:00
Dear list,
I am relatively new to ordinal models and have been working through the example
given by Frank Harrell in the predict.lrm {Design} help
All of this makes sense to me, except for the responses, i,e how do i interpret
them? i would be extremely grateful if someone could explain the re
Hi List,
I am some what new to R-world.
I am trying to plot some vector data, each vector has a direction and
magnitude, the data is taken from an array of points, some of the coverage
area overlap, some do not. Due nature of the grid there are some points
that lack data.
Can any body recommend
Hi:
CW.lm <- lm(weight ~ Diet, ChickWeight)
resid.CW.lm <- resid(CW.lm)
as.data.frame(resid(CW.lm))[1:10, ] # (nope)
[1] -60.645455 -51.645455 -43.645455 -38.645455 -26.645455 -9.645455
[7] 3.354545 22.354545 46.354545 68.354545
# convert residuals to one column matrix, then convert t
Sorry about this, I used your item as prototype to get the email address.
Dave.
> Hi List,
>
> I am some what new to R-world.
>
> I am trying to plot some vector data, each vector has a direction and
> magnitude, the data is taken from an array of points, some of the coverage
> area overlap, some
Hi,
I was wondering if there is an easy way to accomplish the following in R:
Often I want to apply a function, e.g. weighted.quantile from the Hmisc package
to grouped subsets of a data.frame (grouping variable) but then I also need to
hand over the weights which seems not possible with summary
John,
Don't conclude that one category is the most probable when its probability
of being equaled or exceeded is a maximum. The first category would always
be the winner if that were the case.
When you say y=best remember that you are dealing with a probability model.
Nothing is forcing you to
Frank,
Thats great thanks for the advice, i appreciate that brier score, AUC etc are a
better method of validation and discrimination but when it comes to
predictions of new data
> d <- data.frame(x1=c(.1,.5),x2=c(.5,.15))
> predict(f, d, type="fitted.ind")
>
> y=good y=better
Probably there are not many people on this list left with such an
ancient installation. Please try R-2.12.0 alpha.
Uwe Ligges
On 01.10.2010 11:49, Oderbolz Daniel wrote:
Dear R-users,
I successfully installed rtiff on by R installation, but when I tried to
load it, I got:
local({pkg<- sele
On 01/10/2010 2:12 AM, Sven Wagner wrote:
Hi!
For saving 3d plots I make use of the "rgl.snapshot" command provided within
the rgl-Package. So far there was no problem using Windows XP, but under
Windows 7 the result is a black image, however in the png-format (see
attachment http://r.789695.n
You might want to check out the plyr package.
Hadley
On Fri, Oct 1, 2010 at 6:05 AM, Werner W. wrote:
> Hi,
>
> I was wondering if there is an easy way to accomplish the following in R:
> Often I want to apply a function, e.g. weighted.quantile from the Hmisc
> package
> to grouped subsets of a
On 27-Sep-10 08:55:13, Maayt wrote:
> As this forum proved to be very helpful, I got another question...
> I'd like to fit data points on which I have an error, dx and dy,
> on each x and y. What would be the common procedure to fit this
> data by a linear model taking into account uncertainty on e
I have the following structure:
> str(propn)
table [1:2(1d)] 0.674 0.326
- attr(*, "dimnames")=List of 1
..$ label: chr [1:2] "o" "x"
> print(propn)
label
o x
0.6738347 0.3261653
How can I access the value of "o" and "x"
I tried this but fail
> print(propn$label[,"o"];
-
Why assign them at all? Is this a "forced choice at gunpoint" problem?
Remember what probabilities mean.
Frank
-
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context:
http://r.789695.n4.nabble.com/Interpreting-the-example-given-by-Frank-Harrell
Thanks, but your suggestions don't solve the problem. Though, the plot is
storable via the rgl.postscript command, but this increases computation time
and memory requirements.
--
View this message in context:
http://r.789695.n4.nabble.com/RGL-and-Windows-7-tp2844487p2910131.html
Sent from the R
On 01/10/2010 9:53 AM, Sven Wagner wrote:
Thanks, but your suggestions don't solve the problem. Though, the plot is
storable via the rgl.postscript command, but this increases computation time
and memory requirements.
rgl.postscript is limited in the kinds of scenes it can render, so check
care
On 2010-10-01 7:43, Gundala Viswanath wrote:
I have the following structure:
str(propn)
table [1:2(1d)] 0.674 0.326
- attr(*, "dimnames")=List of 1
..$ label: chr [1:2] "o" "x"
print(propn)
label
o x
0.6738347 0.3261653
How can I access the value of "o" and "x"
I
There is the lmodel2 package...
http://cran.r-project.org/web/packages/lmodel2/vignettes/mod2user.pdf
Geometric mean regression has been discussed on this list in the past,
for example:
https://stat.ethz.ch/pipermail/r-help/2005-June/072927.html
I've used that approach with nls (rightly or wrongl
Frank and list,
The reason I am trying to assign them is because I have a data set where i have
arrived at the most likely model that describes the data and now I have
another dataset where I know the factors but not the response.
Therefore, surely I need to assign the predicted values to a r
David,
Following on from Jim Lemon's suggest that polar plots might be more what you
need, there are both wind rose and polar plot functions in the openair package
that might be of use (particularly windRose and polarFreq). They will not do
everthing you are after without some careful condition
Hello!
In the example below the Reduce() function by default assigns "a" to
be the last accumulated value and "b" to be the current value in "x".
I could not find this documented anywhere as the default settings for
the Reduce() function. Does any sort of documentation for this
behavior exist?
x
On 2010-09-30 15:42, ashz wrote:
Hi,
I have modified a known script to generate a scatterplot matrix:
panel.cor = function(x, y, digits=2, prefix="Rho=", cex.cor)
{
usr = par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r = abs(cor(x, y, use="pairwise.complete.obs", metho
Hi,
Take a matrix with missing values:
> X = matrix(rnorm(10), ncol = 5)
> X[2,4]=NA
> X
[,1] [,2] [,3] [,4] [,5]
[1,] -0.1566427 -0.7382232 -1.0564624 -0.8412139 0.9370319
[2,] -1.0289865 -0.8452054 -0.1349459 NA -0.1749113
I want to apply a custom fu
You can use na.omit on x after it is passed into your apply function
if na.rm == T, or simply pass your na.rm to functions that use it,
such as sum.
Hope that helps,
Jeff.
On Fri, Oct 1, 2010 at 11:07 AM, Ochsner, Scott A wrote:
> Hi,
>
> Take a matrix with missing values:
>
>> X = matrix(rnorm
How do you call R methods from Java? I want to create a GUI using Swing in
Jaa that calls R methods in Java.
--
View this message in context:
http://r.789695.n4.nabble.com/Creating-R-objects-in-Java-tp2904497p2904497.html
Sent from the R help mailing list archive at Nabble.com.
_
Doh! Of course!
Thanks for this. I convinced myself that the input image to
rasterImage() had to be scaled 0-1. I think I started down that path
by trying the following with as.raster() ...
> m <- matrix(data = rep(seq(0,3, length = nx), ny), ncol = nx, nrow
= ny, byrow = TRUE)
> r <- as
Dear R-community,
I have a short question: How do I interpret the result of a
likelihood ratio test correctly?
I am fitting a parametric survival model (with aftreg {eha}) and the
output tells me the overall p-value of my model is < 0.001. My
simple question is: Does the result mean my model fits
hii everyone!
Recently i have started working with R and it would be nice if anyone can
help me with this.
I am vista user (32 bit). I wanted to install package in my parent directory
i.e .Library. whenever I try to install nnet (package) it is showing me the
following error:
> install.packages(
hi
I'll take a look at it.
-
[url=http://moviesonlineworld.com]watch free movies online[/url]
--
View this message in context:
http://r.789695.n4.nabble.com/Inserting-a-plot-into-another-tp2720936p2877931.html
Sent from the R help mailing list archive at Nabble.com.
_
hii everyone!
Recently i have started working with R and it would be nice if anyone can
help me with this.
I am vista user (32 bit). I wanted to install package in my parent directory
i.e .Library. whenever I try to install nnet (package) it is showing me the
following error:
> install.packag
If for example I have garchFit(~garch(1,1) but I want to loop through all the
different combinations of ARMA/GARCH/APARCH. Another model could be
~arma(2,1)+apaarch(1,1). How do I transition between garch(1,1) and
arma(2,1)+apaarch(1,1) using a for loop.
--
View this message in context:
http://
The reason I am trying to assign them is because I have a data set where i have
arrived at the most likely model that describes the data and now I have
another dataset where I know the factors but not the response.
Therefore, surely I need to assign the predicted values to a response in order
Hi R experts
I am just wondering if something is already available (or easily adaptable) to
do the following.
I am planning to build linear models for all possible combinations of terms, so
for example if the terms are sent into a function as this string
" X1 + X2 + X3 + X4 + X1:X2"
I would
Youre working too hard. Use this:
tms <- as.POSIXct(strptime(v, "%a %b %d %H:%M:%OS %Y"))
Take note of the fact that there are two types of datetime objects: POSIXct
and POSIXlt.
Your unlist() gave what seemed a strange result because you used on an lt
object. Had you given it a ct ob
Tal Galili gmail.com> writes:
> You'll need to give more information for people to help you.
>
> 1) Is this the first time you installed R? Or was it a working R version
> that suddenly started having this problem?
> 2) Did you try uninstalling this version, downloading a new version,
> install
On 01/10/2010 7:39 AM, Neeti wrote:
hii everyone!
Recently i have started working with R and it would be nice if anyone can
help me with this.
I am vista user (32 bit). I wanted to install package in my parent directory
i.e .Library. whenever I try to install nnet (package) it is showing me the
Jeff,
Thanks for the help. I should have thought of passing na.rm to sum. This
worked nicely.
Scott
Scott A. Ochsner, PhD
One Baylor Plaza BCM130, Houston, TX 77030
Voice: (713) 798-6227 Fax: (713) 790-1275
-Original Message-
From: jsp...@gmail.com [mailto:jsp...@gmail.com] On Beha
On 10/1/10 9:18 AM, lord12 wrote:
How do you call R methods from Java? I want to create a GUI using Swing in
Jaa that calls R methods in Java.
Look in the documentation for the rJava package
--
Abhijit Dasgupta, PhD
Director and Principal Statistician
ARAASTAT
Ph: 301.385.3067
E: adasgu...@
Thank you so much... it is working fine
--
View this message in context:
http://r.789695.n4.nabble.com/help-regarding-the-package-installation-tp2894726p2925020.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mail
The usual way, I suppose: (1 - RSS (model with only a
constant)/RSS(full model)).
However, it's not particularly meaningful to do this, because points
are weighted differently depending on the model. This means that the
usual interpretation as the proportion of unexplained variation is
wrong; and
Hello All:
I was wondering why many plot options are not working with mhtplot. I could
not find much info about this function on the web too. Any comments, any
detailed manual ...
Thanks,
MJK
[[alternative HTML version deleted]]
__
R-help@r-pr
On Fri, 1 Oct 2010, Dimitri Liakhovitski wrote:
Hello!
In the example below the Reduce() function by default assigns "a" to
be the last accumulated value and "b" to be the current value in "x".
I could not find this documented anywhere as the default settings for
the Reduce() function. Does an
Hi, I am wondering if anyone can propose a simple/best way to do the following:
Let's say I have a data frame
dat <-
cbind(expand.grid(mode=c('right','left'),time=0:3,id=c('p1','p2','p3')),y=c(3,5,rep(4,6),6,2,rep(3,6),4,4,rep(2,6)))
dat
mode time id y
1 right0 p1 3
2 left0 p1
u... You are reinventing the wheel. In fact, several wheels: the
statistical literature already has several different approaches worked
out for this. For example, George Box and David Steinberg did one
about 20 years ago, and it has been incorporated as one of the options
in the JMP DOE model c
>Hello,
>
>I'm trying to introduce myself to ggplot2. I'm using syntax from the help
>file, but pasting in my own data. I don't understand the error message I'm
>getting. Can anyone clue me in? A Google search of this error statement
>didn't return anything I could recognize as useful.
>
Hi, I am trying to install R commander. I used the command:
install.packages("Rcmdr", dependencies = TRUE)
It gives me this:
Warning in install.packages("Rcmdr", dependencies = TRUE) :
argument 'lib' is missing: using
'C:\Users\Karimi\Documents/R/win-library/2.11'
trying URL
'http://cran.opens
Try this,
qplot(outcome, counts, data=d.AD, facets=.~ treatment)
HTH,
baptiste
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide c
I calculated a large vector. Unfortunately, I have some measurement error
in my data and some of the values in the vector are erroneous. I ended up
wih some Infs and NaNs in the vector. I would like to filter out the Inf
and NaN values and only keep the values in my vector that range from 1 to
2
Try this:
x[is.finite(x)]
On Fri, Oct 1, 2010 at 2:51 PM, wrote:
> I calculated a large vector. Unfortunately, I have some measurement error
> in my data and some of the values in the vector are erroneous. I ended up
> wih some Infs and NaNs in the vector. I would like to filter out the Inf
Here are two ways:
dat0 = subset(dat,time==0)
one = as.data.frame(as.table(by(dat0,dat0$id,
function(x)as.character(x$mode)[which.max(x$y)])))
names(one) = c('id','type')
merge(dat,one)
two = sapply(split(dat0,dat0$id),
function(x)as.character(x$mode)[which.max(
Mike,
Small, reproducible examples are always useful for the rest of the us.
x <- c(0, NA, NaN, 1 , 10, 20, 21, Inf)
x[!is.na(x) & x >=1 & x<= 20]
Is that what you're looking for?
mlar...@rsmas.miami.edu wrote:
I calculated a large vector. Unfortunately, I have some measurement error
in my d
On Fri, Oct 1, 2010 at 10:51 AM, wrote:
> I calculated a large vector. Unfortunately, I have some measurement error
> in my data and some of the values in the vector are erroneous. I ended up
> wih some Infs and NaNs in the vector. I would like to filter out the Inf
> and NaN values and only k
Reinstall R and select the option for tcltk support in the installer.
Uwe Ligges
On 01.10.2010 19:42, kreamysaverz wrote:
Hi, I am trying to install R commander. I used the command:
install.packages("Rcmdr", dependencies = TRUE)
It gives me this:
Warning in install.packages("Rcmdr", dependen
On Oct 1, 2010, at 12:51 PM, mlar...@rsmas.miami.edu wrote:
> I calculated a large vector. Unfortunately, I have some measurement error
> in my data and some of the values in the vector are erroneous. I ended up
> wih some Infs and NaNs in the vector. I would like to filter out the Inf
> and Na
Complementing:
findInterval(x[is.finite(x)], 1:20)
On Fri, Oct 1, 2010 at 2:55 PM, Henrique Dallazuanna wrote:
> Try this:
>
> x[is.finite(x)]
>
>
>
> On Fri, Oct 1, 2010 at 2:51 PM, wrote:
>
>> I calculated a large vector. Unfortunately, I have some measurement error
>> in my data and some o
Thank you Phil. The only problem with the code is when the 2 y values are
equal,
it should default to "right". Your code would default to the first maximum. But
it's ok, I see the logic here and can figure it out. I wondered whether there
is
some one-line thing that can do this, I guess not po
It turns out I didn't have to filter out the 1-20 values.
The code of x[is.finite(x)] did the trick.
Thanks!!!
Mike
Original Message
Subject: Re: [R] cleaning up a vector
From:"Henrique Dallazuanna"
Date:Fri, October 1, 2010
You do not have to worry about re-defining your function to handle the
constraints on parameters. You can let the optimizer worry about it.
lik <- function(nO, nA, nB, nAB){
loglik <- function(par)
{
p=par[1]
q=par[2]
r <- 1 - p - q
-(2 * nO * log
Try this:
merge(dat, factor(with(dat[!dat$time,], tapply(y, id,
function(x)ifelse(all(mean(x) == x), 1, which.max(x, labels = c('right',
'left')), by.x = 'id', by.y = 0)
On Fri, Oct 1, 2010 at 3:15 PM, array chip wrote:
> Thank you Phil. The only problem with the code is when the 2 y values
T. Smithson yahoo.de> writes:
>
> Dear R-community,
>
> I have a short question: How do I interpret the result of a
> likelihood ratio test correctly?
>
> I am fitting a parametric survival model (with aftreg {eha}) and the
> output tells me the overall p-value of my model is < 0.001. My
> sim
I'm trying to run R in batch mode on an LSF managed cluster. In simple
settings, I can do it just fine. The trouble I'm having is when I try to
pass arguments to the batch job. For example,
bsub R CMD BATCH --args 1 3 commandfile.R &
LSF doesn't like the &, and it doesn't run. I'm hoping one
Hi:
I get a couple of warnings when trying to download gridExtra:
install.packages("gridExtra",repos=http://R-Forge.R-project.org)
Warning: unable to access index for repository
http://R-Forge.R-project.org/bin/windows/contrib/2.10
Warning message:
In getDependencies(pkgs, dependencies, avail
Well, a quick check of
http://r-forge.r-project.org/bin/windows/contrib/
shows that there is no 2.10 directory, possibly because
it's not very new, 2.12 is scheduled for release in 2 weeks.
Felipe Carrillo wrote:
Hi:
I get a couple of warnings when trying to download gridExtra:
install.pack
Forgot to mention you should be able to install from a CRAN
mirror.
Felipe Carrillo wrote:
Hi:
I get a couple of warnings when trying to download gridExtra:
install.packages("gridExtra",repos=http://R-Forge.R-project.org)
Warning: unable to access index for repository
http://R-Forge.R-proj
Is there some reason you don't want the CRAN version?
-Ista
On Fri, Oct 1, 2010 at 3:08 PM, Felipe Carrillo wrote:
>
> Hi:
> I get a couple of warnings when trying to download gridExtra:
> install.packages("gridExtra",repos=http://R-Forge.R-project.org)
>
> Warning: unable to access index for
I must be blind, CRAN was my first try and didn't see it there.
It is Friday and time to take a break I guess :-)
Â
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
>
>From: Ista Zahn
>To: Felipe Carrillo
>Cc: r-h...@st
Mohsen Jafarikia gmail.com> writes:
> I was wondering why many plot options are not working with mhtplot. I could
> not find much info about this function on the web too. Any comments, any
> detailed manual ...
I'm afraid this one gets the usual answers:
1. what does "not work" mean? (Please
Can anyone tell me how to run contrasts for MANOVA?
Thanks!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
I have this discussion fairly often with doctors that I work with. The issue
is that you can certainly predict from a model, but you can predict on
different scales. Let's consider the simpler case of just 2 outcomes (disease
yes/no):
Let's say you have 4 patients that you want to predict the
It looks like the list of packages is not refreshing on my pc because
If I go to packages > install packages I don't see it there next to 'gridBase'
but I went to the CRAN website and there it is right next to 'gridBase'.
I had to manually download the Windows binary from there, saved it to my
des
Hi,
I am looking for some generalization of colSums and rowSums for general
vector valued functions, and for arrays of more than 2 dimensions.
So as a concrete example, suppose I have a 3 dimensional array, given by x
= array(1:100,c(3,4,5)).
and I want to sum the 3rd index of x to obain a 3
Hi. I would like to make a scatterplot where all of the points are evenly
spaced from each other - however, they are all the same size and occupy the
entire graph. For example:
x = rep(c(1:10), 10)
y = rep(c(10:1), each = 10)
plot(x, y, pch = 0)
Gives me a scatter plot with 100 square points eac
It doesn't work...
where should change?
Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/Help-How-to-use-loop-to-achieve-this-aim-tp2819894p2922193.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project
Dear R help list,
I am desperately looking for any reference explaining by examples how to
write R codes in order to fit the parameters of a given model using maximum
likelihood or any other criteria function. I know the general structure:
First write a code for the maximum likelihood function an
Hi Abderrahim,
I find this book particularly helpful:
http://www.meb.ki.se/~yudpaw/likelihood/likelihood-index.htm
Shige
On Fri, Oct 1, 2010 at 12:15 PM, abderrahim youssef
wrote:
> Dear R help list,
>
> I am desperately looking for any reference explaining by examples how to
> write R codes i
Correcting Karena's solution:
for(i in 1:22) {
chrn <- paste("chr",i,sep="")
chrn=MEDIPS.readAlignedSeqences(BSgenome="hg19", file=chrn,numrows=
?) # no quotes around chrn
chrn=MEDIPS.genomeVector(data=chrn, bin_size=50,extend=250)
frames=? # I don't know how you get this variable
...
ou
On Oct 1, 2010, at 10:41 AM, thernubblet wrote:
>
> Hi. I would like to make a scatterplot where all of the points are evenly
> spaced from each other - however, they are all the same size and occupy the
> entire graph. For example:
>
> x = rep(c(1:10), 10)
> y = rep(c(10:1), each = 10)
> plot(x
Thanks for the help. This solves my problem - I wanted to print out
errors and warnings on separate lines with a single call.
Thanks,
David
On Thu, Sep 30, 2010 at 3:42 PM, Jeremy Miles wrote:
> Try using cat instead. Then "\n" is the new line character.
>
> E.g.
> cat("1st line\n2nd line\n")
I am trying to figure out how to run maximum likelihood in R. Here is my
situation:
I have the following equation:
equation<-(1/LR-(exp(-k*T)*LM)*(1-exp(-k)))
LR, T, and LM are vectors of data. I want to R to change the value of k
to maximize the value of equation.
My attempts at optim and opt
If it is important to have points rather than just create the grid, then you
could do something using the my.symbols function in the TeachingDemos package.
One of the examples on the help page fills the plot with hexagons, the
calculations for squares should be simpler.
--
Gregory (Greg) L. S
Do you want to do a nonlinear least-squares estimation (which is MLE if the
errors are Gaussian)?
If so, you have to define a function that takes the parameter (k) and data
matrix (LR, T, LM), as arguments, and returns a scalar, which is the
residual sum of squares. Then you can optimize (minimiz
Dear R community,
The next release of package ff is available on CRAN. With kind help of Brian
Ripley it now supports the Win64 and Sun versions of R. It has three major
functional enhancements:
a) new fast in-memory sorting and ordering functions (single-threaded)
b) ff now supports on-disk so
Shige Song gmail.com> writes:
>
> Hi Abderrahim,
>
> I find this book particularly helpful:
> http://www.meb.ki.se/~yudpaw/likelihood/likelihood-index.htm
>
> Shige
>
> On Fri, Oct 1, 2010 at 12:15 PM, abderrahim youssef
> googlemail.com> wrote:
> > Dear R help list,
> >
> > I am desperately
Hello!
I came accross a strange behavior of the plm package. When using an
unbalanced panel with years lag() and diff() do not recognize a break in
the time dimension. It does, however, if there is only one more year
after the break. This is strange, right?
Consider the following example:
> lib
On Fri, 1 Oct 2010, yunjiangster wrote:
Hi,
I am looking for some generalization of colSums and rowSums for general
vector valued functions, and for arrays of more than 2 dimensions.
So as a concrete example, suppose I have a 3 dimensional array, given by x
= array(1:100,c(3,4,5)).
and I want
Well put Greg. The job of the statistician is to produce good estimates
(probabilities in this case). Those cannot be translated into action
without subject-specific utility functions. Classification during the
analysis or publication stage is not necessary.
Frank
-
Frank Harrell
Departme
Hello Everyone,
Just finished reading A Handbook of Statistical Analyses using R by Everitt and
Hothorn. I'll begin by saying that I quite liked the book. It's both little and
mighty in the sense that it's very compact but contains a tremendous amount of
useful material.
The last chapter of
Hi,
I am looking for a one-liner code for the following situation
say I have a vector r of 0 and 1's, and another vector v of equal length. I
want to assign v[i]-1 to v[i] if r[i]=1, for all i. How would I do that
using mapply or any other batch processing keywords? thanks.
John
--
View this
Hello!
I wrote a function that returns a data frame. Nowhere in the function
do I say print(my.data.frame), but when I run the function - the data
frame is printed on the console.
Is there any way to suppress it?
Thank you!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
___
?invisible
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
John -
Is this what you're looking for?
r = sample(c(0,1),10,replace=TRUE)
r
[1] 0 1 0 1 1 0 0 1 0 1
v = 1:10
ifelse(r == 1,v-1,v)
[1] 1 1 3 3 4 6 7 7 9 9
- Phil Spector
Statistical Computing Facility
1 - 100 of 119 matches
Mail list logo