There is a package "lpSolve" that you might want to look at. At the R
prompt, do the following:
> install.packages("lpSolve")
Once the package will be installed, you can type help(lpSolve) to get
details.
cheers,
-Girish
On Nov 13, 8:37 am, "Yun, Myung Ho" <[EMAIL PROTECTED]>
wrote:
> Dear All,
This is 'linear programming'. Try
RSiteSearch("linear programming")
The first few fits will give you a lot to explore.
On Thu, 13 Nov 2008, Yun, Myung Ho wrote:
Dear All,
First of all, this is the first time for me to use R for optimization, I
tried to search r-help postings & googled on wei
Dear All,
First of all, this is the first time for me to use R for optimization, I
tried to search r-help postings & googled on weighted sum optimization,
I could not find anything applicable.
I would need to optimize following function in R;
MAXIMIZE
function = w1*R1 + w2*R2 + w3*R3 + w4*R
salutations!
i am doing some longitudinal modeling with sem and thought calculating some
"simple variables" would make my model more readable. this is the smallest
subset of my model that illustrates the resulting problem.
i have 2 observed exogenous variables (c1, d2) and 4 observed endogenous
v
On Wed, Nov 12, 2008 at 7:41 AM, <[EMAIL PROTECTED]> wrote:
>
> Dear Deepayan,
>
> thanks for you quick response.
>
> The main idea is to use trellis_object$call$x as a label in a tcltk
> interface to choose one among several plots and perform a given task (e.g.
> print on screen, export as pdf e
Yet again my baroque programming style shows itself. The . notation is
great, although solution 2. is perhaps more versatile, allowing you to
pick and choose your predictors more easily.
On Thu, 2008-11-13 at 11:56 +1100, [EMAIL PROTECTED] wrote:
> Two possible ways around this are
>
> 1. If the
You can construct the formula on the fly. Say you have a data frame with
columns: y, x1,...x10:
dat <- data.frame(matrix(rnorm(1100), ncol=11, dimnames=list(NULL,c("y",
paste("x", 1:10, sep="")
Then you could construct the formula using:
form <- formula(paste("y ~ ", paste(names(dat)[which(n
Two possible ways around this are
1. If the x's are *all* the other variables in your data frame you can use a
dot:
fm <- lm(y ~ ., data = myData)
2. Here is another idea
> as.formula(paste("y~", paste("x",1:10, sep="", collapse="+")))
y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10
>
(Y
On Tue, 2008-11-11 at 23:56 -0500, stephen sefick wrote:
> What does Generalized Cross Validation score mean. I preform and
> ordisurf on an ordination (nmds) with an environmental variable. I am
> trying to figure out "how well" the environmental varibles
> predict/explain the sites placements i
The special name "." may be used on the right side of the "~" operator,
to stand for all the variables in a data.frame other than the response.
--John Chambers, Statistical Models in S, p. 101
So, if the y and Xi (in your case) were the only variables in mydata, then
lm(y ~ . , data = mydata)
Hello,
Say I want to make a multiple regression model with the following expression:
lm(y~x1 + x2 + x3 + ... + x_n,data=mydata)
It gets boring to type in the whole independent variables, in this
case x_i. Is there any simple way to do the metaprogramming for this?
(There are different cases wher
> In two recent in press articles where I cited R packages,
> I was asked by the copy-editor to add a location or url to the references.
> Could I suggest that citation() be modified to include
> the URL automatically?
>
I second this suggestion. I experienced similar case once as well.
>
> --
>
The first hit for search on "sample size" and "poisson" on Baron's
search engine web interface appears on target:
http://search.r-project.org/cgi-bin/namazu.cgi?query=%22sample+size%22+poisson&max=100&result=normal&sort=score&idxname=functions&idxname=Rhelp02a
Getting the same result from your
Hi all
Consider the family function, as used by glm. The help page says the value
of the family object is a list, one element of which is the following:
dev.resids function giving the deviance residuals as a function of (y, mu, wt).
But reading any of the family functions (eg poisson) sh
Is there a function in R that will allow me to estimate the sample
size required from count data (poisson data?), given the known
variance and desired margin of error and confidence interval?
My specific data set will be based on a survey of hikers that will be
asked about the number of anim
Just a clarification on one of my statements below. I realize on rereading my
statement on R-core paying attention that it could be interpreted as a possible
criticism. That is not how it was intended, rather that I have seen cases in
the past where a discussion confirms that something is a bu
I have 200 samples, with 1 million data points in each. Each data
point can have a value from zero to 10, and we can assume that they're
normally distributed. If I calculate a sum by drawing one random data
point from each sample and adding them, what value does that sum need
to be before I can say
You can fix the space problem by using '[^[:digit:]]' instead
of '[[:alpha:]]' and '[^[:alpha:]]' instead of '[[:digit:]]'
On Wed, Nov 12, 2008 at 5:10 PM, Peter Alspach
<[EMAIL PROTECTED]> wrote:
> Tena koe
>
> Try:
>
> gsub('[[:alpha:]]', '', unlist(DATA)) and
> gsub('[[:digit:]]', '', unlist(DA
CE.KA wrote:
>
> x
> 1 12F
> 2 13 AD
> 3 356PO
> 4 1D
> 5 GRT
> 6 PO52
> 7 LN4Z
>
> Is there a way to separarate x in 2 variables:
> y: only numeric caracters
> z: only alpha caracters
> For exemple:
> x y z
> 1 12F12 F
> 2 13 AD 13
Tena koe
Try:
gsub('[[:alpha:]]', '', unlist(DATA)) and
gsub('[[:digit:]]', '', unlist(DATA))
unlist(DATA) since it looks like DATA maybe a dataframe.
You are still left with the spaces, but these can be readily removed.
Someone else may offer a better solution.
HTH ...
Peter Alspach
> -
Kia ora Grant
The problem is that
feb[sample(nrow(feb),###),]
randomly rearrangements the rows of all columns together, and hence
doesn't altering the pairing. Try
cor(feb[, col1], feb[sample(nrow(feb)), col2])
HTH
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
Hello R users,
Imagine the data frame DATA with the variable x which is composed by numeric
and alpha caracters.
> DATA
x
1 12F
2 13 AD
3 356PO
4 1D
5 GRT
6 PO52
7 LN4Z
Is there a way to separarate x in 2 variables:
y: only numeric caracters
z: only alpha caracters
For exemple
Victor -
What package/functions did you use to do the fit? Can you send a small
example with a made-up or built-in dataset, show how far you get, and
what you'd like to have as the result? It's much easier to show what to
do when we know what functions and packages you're using to get your
Hello everyone,
I have a dataset in the following format:
col1 col2
# #
# #
# #
# #
# #
# #
What I want to do is:
loop a random sample 10 times, and for each time it is sampled I want to
run a correlation between both columns. What I have so far is this:
>feb <- read.
Is there a way to obtain the parameters (mean, sd, amplitude) of the
gaussian functions obtained in a density fit to data. The faithful
$waiting times is a standard example. The 2-gaussian fit is very nice,
but how can I obtain the parameters?
Thanks for your help.
Regards,
Victor Bloomfiel
Alireza,
The "lm" function fits the linear regression (linear model), the "predict"
function predicts new response values based on values of the predictor
variables.
Try something like:
> mydata <- data.frame( x=1:30, y=31:60+rnorm(30) )
> fit1 <- lm( y ~ x, data=mydata )
> summary(fit1) # opt
lm, for example:
fit1<-lm(y~x,data=mydata)
if you enter
?lm
in an R session you will get more information.
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Stree
Hi List,
Does anybody know what function I need to use for a simple regression?
Here is the data: I want to find the value for x1=3.5
data<-data.frame(x=c(1:30),Value=c(31:60))
x1<-3.5
Regards,
Alireza
[[alternative HTML version deleted]]
__
R
sample(100)
On Wed, Nov 12, 2008 at 3:24 PM, Stuart Leask
<[EMAIL PROTECTED]> wrote:
> Feeling very stupid here.
>
> I just want to randomly-ordered some integers, e.g. the numbers 1 to
> 100, with each element present once only in a random order.
> I suspect I need to randomly sample a population
sample(1:100)
-- David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Stuart Leask
Sent: Wednesday, November 12, 2008 2:24 PM
To: [EMAIL PROTECTED]
Subject: [SPAM] - [R] How can I generate a random order? - Found word(s)
remove list in the Text body
F
Feeling very stupid here.
I just want to randomly-ordered some integers, e.g. the numbers 1 to
100, with each element present once only in a random order.
I suspect I need to randomly sample a population 1-100, remove that
number, then randomly sample what is left until they've all gone, but I
c
Greg Snow wrote:
Sarah,
Doing:
RSiteSearch('gompertz', restrict='functions')
At the command prompt gives several promising results.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
And you can also do:
nobs <- length(data$salam.size.observed)
fn<-function(p){
salam.size.mod
The same thing is affecting plot 2 as well. Basically in the code there is
line early on:
r <- residuals(x)
which gets the residuals and by default for glm models those are the deviance
residuals.
A bit latter is the code (after some optional modifications to r):
if (any(show[2:3])) {
you may want to look into Hadley's new package plyr for this kind of
operation.
baptiste
On 12 Nov 2008, at 17:51, Stavros Macrakis wrote:
By-the-way^2: is there some Xapply function that maps a function over
all the elements of a structure (vector, matrix, list, ...) and
preserves the origi
Sarah,
Doing:
> RSiteSearch('gompertz', restrict='functions')
At the command prompt gives several promising results.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
> -Original Message-
> From: [EMAIL PR
On 11/12/08, Kenneth Roy Cabrera Torres <[EMAIL PROTECTED]> wrote:
> Dr. Sarkar:
>
> Thank you very much for your help!
>
> Is there any problem that it shows this warning message?
>
> Warning messages:
> 1: In levels.fos - blist.height/2:
> Length of object is greater or is not multiple
>
Try this command from within R:
RSiteSearch("gompertz")
On Wed, Nov 12, 2008 at 1:50 PM, sarahkm <[EMAIL PROTECTED]> wrote:
>
> Hi-
> I'm a biologist trying to figure out the growth rate of salamanders in
> different ponds. I collected individuals from various populations at
> different dates, an
==
USAR2009 R/R-PLUS/S CONFERENCE ANNOUNCEMENT & CALL FOR PAPERS
==
The 2009 R/R-PLUS/S Conference will take place in Las Vegas,USA
April 26-30, 2009
The meeting is open to al
Scott,
can you, please, include sessionInfo() in your output? Without knowing
what machine you're running on (and incomplete output you sent) I can
only guess that you simply don't have universal binary of your
dependent libraries so you cannot build a universal package (somewhat
likely g
On 13/11/2008, at 7:50 AM, sarahkm wrote:
Hi-
I'm a biologist trying to figure out the growth rate of salamanders in
different ponds. I collected individuals from various populations at
different dates, and using the size and date collected, I want to
figure out
the growth curve of each popu
Hi R users:
I want to know if there is any package that makes
the specific computation 2^k factorial designs as in:
George E. P. Box, J. Stuart Hunter and William G. Hunter.
Statistics for Experimenters. Second Edition. 2005.
John Wiley & Sons.
They advice about the misuse of the ANOVA table
in
There's also a big difference in plot 2 (Normal Q-Q) in my real data, but I
don't see a real difference in plot 2 for the example I sent, except that
some of the outlier labels are different. Would the residuals being plotted
likely be the cause of the difference in plot 2 as well? Dr. Snow, woul
Hi-
I'm a biologist trying to figure out the growth rate of salamanders in
different ponds. I collected individuals from various populations at
different dates, and using the size and date collected, I want to figure out
the growth curve of each population. My question is: How do I fit my data to
>From a quick look at the code it looks like when you ask for plot number 5
>(included in default when 'which' is not specified), then the deviance
>residuals are replaced by the pearson residuals to be used in later
>computations. So the difference that you are seeing is that one of the plots
I currently run simulations on an IBM x31 Thinkpad (laptop), with an Intel
Pentium M, 1.3GHz processor. I am planning to buy a desktop to help speed
up my work, but I am wondering if R is compatible with some of the newer
technology that has come to market (i.e., Intel Core 2 Duo, Quad Core
pr
Markus,
You may also want to read the Help Desk article in the 8/1 R-News newsletter.
It discusses the similarities and differences of *apply and loops and also
shows the slowdowns from some common loops (that *apply tend to avoid).
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical
This was the scenario that Phoebe posted about. Her data was:
2.93290e-06 1.17772e-06 -0.645205 rs2282755
3.07521e-06 3.14000e-04 0.412997 rs1336838
4.84017e-06 2.18311e-01 0.188669 rs2660664 rs967785
9.77861e-06 7.04740e-02 0.294653 rs2660664
1.22767e-05 1.56325e-05 0.569826 rs6870519
2.
Hi Dr. Ripley--Sorry for the repost everybody. The original message I sent
never showed up in my inbox, so I thought it didn't get sent to the list.
I'm running R 2.8.0, installed from a pre-compiled version, on Windows XP.
When I type Sys.getlocale() at the R prompt, it returns:
"LC_COLLATE=Eng
See ?Vectorize.
sqrt() works on a matrix, and so does
A <- matrix(1:4^2,2,2)
A[] <- sapply(A, sqrt)
On Wed, 12 Nov 2008, Stavros Macrakis wrote:
`outer` (and related functions like kronecker) require that their
functional argument operate elementwise on arrays. This means for
example that
`outer` (and related functions like kronecker) require that their
functional argument operate elementwise on arrays. This means for
example that
outer( 1:2, 3:4, list)
or
outer(1:2,3:4,function(a,b){1})
gives an error.
Is there a version of `outer`/`kronecker`/etc. that takes arbitr
Hi,
I'm trying to install rimage on a Mac OS X 10.4 machine. I followed the
advice in previous R-help threads and got over the hurdles of having the
header files in the right places, among other things. But I can't
figure out what to do with this error.
ice.pnl.gov:/home/waichler<949>system_pro
See ?sink (and heed the warnings).
Depending on what the connections are, the stdout and stderr may or may
not interleave correctly.
On Wed, 12 Nov 2008, David Dahl wrote:
R users,
I am aware that R can be invoked such that the operating system
redirects standard error (stderr) to standard
"take all of the matrix *except* those indices", so XW4[,-2] is the
matrix XW4 with the 2nd column *deleted*.
Cheers,
Stephan
Itziar Frades Alzueta schrieb:
Hi,
Does anyone know what the negative indexing of a matrix mean?
I am using the RWeka and this evaluate classifier does not work
Markus Loecher gmail.com> writes:
>
> Dear R users,
> I have been diligently using the apply() family in order to avoid explicit
> for loops and speed up computation.
> However, when I finally inspected the source code for apply, it appears that
> the core computation is a simple loop as well.
>
Instead of re-posting the same message, please study the posting guide and
supply the information asked for, including a reproducible example. There
is no way we can help you unless you help us to help you.
On Wed, 12 Nov 2008, Effie Greathouse wrote:
I am running GLM models using the gamma f
Your input file should be an OpenOffice document; is it? rnw is not an OO
extension. The second file should likely have an odt rather than odf
extension as well, but that woudn't cause the error you're getting.
Sarah
On Wed, Nov 12, 2008 at 11:01 AM, Irina Ursachi
<[EMAIL PROTECTED]> wrote:
> Dea
Hi,
Does anyone know what the negative indexing of a matrix mean?
I am using the RWeka and this evaluate classifier does not work on new
data like this
e <- evaluate_Weka_classifier(m1235,newdata=XW4, complexity =
FALSE,class = FALSE)
while it work with negative indexing:
e <- eva
I have the same problem. If the first row has more columns than later rows,
the fill=TRUE works; however when the first row has LESS columns than later
rows, R won't read in more columns than the length of the first row. Anyone
has solutions?
Yanni
Marc Schwartz wrote:
>
> on 11/11/2008 03:39
Dirk,
I came upon your message below in searching for a different Sweave topic.
Have you pursued this? I'm new to R (9 months). Recently have been doing
data analysis in R and have started pondering the same question, but don't
have any ideas yet. I did do something related to this in SAS, th
Hi,
I need to use the Savage scores to calculate a concordance coefficient. Does
anybody know a package that computes these scores?
Thank you,
Júlia Teles
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
htt
I am running GLM models using the gamma family. For example:
model <-glm(y ~ x, family=Gamma(link="identity"))
I am getting different results for the normal Q-Q plot and the
Scale-Location plot if I run the diagnostic plots without specifying the
plot vs. if I specify the plot ... e.g., "plot(mod
Thank you very much,
looks rather simple when viewed from behind :(
> Try this also:
> xtabs(values ~ diagnosis + marker, data=dataframe)
> You can make your examples self-running by providing fake data for
> diagnosis, e.g. using letters[] instead of diagnosis. In addition, note that
> your cb
Try this also:
xtabs(values ~ diagnosis + marker, data=dataframe)
On Wed, Nov 12, 2008 at 2:31 PM, Thorsten Raff <[EMAIL PROTECTED]>wrote:
> Hello
>
> I have the problem that I want to transform a dataframe as generated by
>
> diagnosis <- rep(diagnosis[1:3], 3)
> marker <- gl(3,3)
> values <- r
Dear R users,
I have been diligently using the apply() family in order to avoid explicit
for loops and speed up computation.
However, when I finally inspected the source code for apply, it appears that
the core computation is a simple loop as well.
What am I missing ? Why the often found advice to
Here is one more approach (just to give more options):
> x <- 1:10
> xx <- embed(x, 2)
> rowMeans(xx)
Or
> complexFn(xx[,2], xx[,1])
Or other variants.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
> -Original Message---
Thorsten Raff med2.uni-kiel.de> writes:
> I have the problem that I want to transform a dataframe as generated by
>
> diagnosis <- rep(diagnosis[1:3], 3)
> marker <- gl(3,3)
> values <- rnorm(9)
> dataframe <- cbind(diagnosis, marker, values)
> dataframe <- dataframe[c(1:5, 7:9), ]
>
> into a m
R users,
I am aware that R can be invoked such that the operating system
redirects standard error (stderr) to standard output (stdout), but I
want to have R itself (not the OS) redirect the connection given by
stderr() to connection given by stdout(). Is that possible? Perhaps
equivalently, can
Hi All,
I am making a R package which uses some C code. and existing library.My src
folder has some .c files. and a Makevars.in
Makevars.in contains
export PKG_LIBS="-L. -lbz2"
R CMD SHLIB bed2vector.C
R CMD SHLIB wdl.C
R CMD SHLIB peaks.C
R CMD SHLIB cdensum.c
When I try library(libraryname). It
David,
Having a function that changes global variables is very frowned on with few
exceptions. It falls into the category of things that you should never do
unless you fully understand why you should never do them (also see fortune(36)).
However, what you want to do may be more of a macro than
I don't know anything about RKWard, so I will leave that question to others
(though my answer to the other questions may help, or may not).
A couple of ways to mix text with plots when using pdf() (or other graphics
output to files) are the textplot function in the gplots package and the
addtab
jim holtman wrote:
> Try something like this (untested):
>
> Pvalues <- lapply(1:25, function(x)get(paste("A", i, sep=""))$p.value)
He probably wants to start one level earlier, with the X1, etc.
How about
nm <- paste("X", 1:9, sep="")
fml <- lapply(nm, function(nm)eval(bquote(.(as.name(nm))~t
You are probably using Windows and do not have a compatible unzip program on
your path.
Shige
On Wed, Nov 12, 2008 at 8:01 AM, Irina Ursachi <
[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am trying to use the function odfWeave. Unfortunately I cannot get
> beyond the folllowing error message:
> "
Hello -
[EMAIL PROTECTED] wrote:
Hi all,
I am performing hundreds of kruskal wallis tests and trying to figure
out how to create a file of the p.values I obtain.
This is the code I use for the tests:
A2<-kruskal.test(X2~treatment)
A3<-kruskal.test(X3~treatment)
A4<-kruskal.test(X4~treatment)
On Wed, 12 Nov 2008, Michael Friendly wrote:
One could complement that by a
url = {http://CRAN.R-project.org/package=tweedie}
In two recent in press articles where I cited R packages,
I was asked by the copy-editor to add a location or url to the references.
Could I suggest that citation()
I think what you need is a good consultant, and with that deadline don't expect
any bargains.
You have not specified your problem with enough detail yet, 2 options (there
are probably many more) include:
Use the nls function with the model as stated
Use the lm function starting as lm( log( 100
This is very nice also. I am going to use this approach in the future when I
use lm. However, I can't seem to get to work the way I want with cenmle. I
will continue to experiment. Thanks folks for the suggestions.
Tom
David Winsemius wrote:
>
>
> On Nov 12, 2008, at 8:48 AM, Tom La Bone wro
Hello
I have the problem that I want to transform a dataframe as generated by
diagnosis <- rep(diagnosis[1:3], 3)
marker <- gl(3,3)
values <- rnorm(9)
dataframe <- cbind(diagnosis, marker, values)
dataframe <- dataframe[c(1:5, 7:9), ]
into a matrix where levels(diagnosis) is indicating the rows
Try something like this (untested):
Pvalues <- lapply(1:25, function(x)get(paste("A", i, sep=""))$p.value)
On Wed, Nov 12, 2008 at 11:15 AM, <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am performing hundreds of kruskal wallis tests and trying to figure out
> how to create a file of the p.values I o
Hi all,
I am performing hundreds of kruskal wallis tests and trying to figure out
how to create a file of the p.values I obtain.
This is the code I use for the tests:
A2<-kruskal.test(X2~treatment)
A3<-kruskal.test(X3~treatment)
A4<-kruskal.test(X4~treatment)
A5<-kruskal.test(X5~treatment)
A6<
Le mar. 11 nov. à 17:20, Terry Therneau a écrit :
Is the matrix exponential available in some package?
You may also have a look at the expm package for a very
straightforward operator:
http://r-forge.r-project.org/projects/expm/
Disclaimer: although entirely usable, the package i
> I am trying to do some time plots with R but it seems that it
> is not working. The problem is that the time is not regular,
> for example, a small dataset can be seen below:
> Date pH
> 1/02/1998 5.5
> 5/03/1998 5
> 8/12/1998 6
> 1/02/1999 6.1
> ...
> 08/10/200
Dear all,
I am trying to use the function odfWeave. Unfortunately I cannot get
beyond the folllowing error message:
"
Error in odfWeave("Example3.rnw", "Example3.odf") :
Error unzipping odt file
"
Can anybody tell me, how to use this function?
Thanks,
Irina Ursachi.
___
Try this (in reality you would use the commented line
in place of the subsequent line) and then read the three
zoo vignettes and R News 4/1.
library(zoo)
library(chron)
Lines <- "Date pH
1/02/1998 5.5
5/03/1998 5
8/12/1998 6
1/02/1999 6.1
08/10/20007.2"
# z <-
To be precise even if you don't use dep = TRUE you get the packages that
are listed in that package's DESCRIPTION file on the "Depends:" and
"Imports:" lines but if you use dep = TRUE you also get the ones in
the "Suggests:" line (and recursively for dependencies of dependencies).
On Wed, Nov 12,
Dear all,
My name is Maria Lathouri and I am currently doing a PhD at Imperial College of
London about time series of environmental variables in surface waters. I am
trying to do some time plots with R but it seems that it is not working.
The problem is that the time is not regular, for exampl
Dear Deepayan,
thanks for you quick response.
The main idea is to use trellis_object$call$x as a label in a tcltk
interface to choose one among several plots and perform a given task (e.g.
print on screen, export as pdf etc.). I've a script that works just fine
in R 2.4.1 for instance, but no
If you are using the windows version, installing packages can be done easily
from the prompt in the R work space by the following statement:
install.packages("name_of_package", dep=TRUE)
the part of dep=TRUE is to allow associated dependencies of packages tp be
installed along side. This saves
Hi,
I have to do a comparison among three groups of genetic transcription
levels.
I have a situation like this:
group 0: baseline
group 1: first treatment
group 2: second treatment
In the first group, I have only 2 samples, in the second one 4 samples and
in the last group I have 10 samples.
I w
Brett Magill sbcglobal.net> writes:
>
> Are there any R packages that could be used to generate random data given a
> set of parameters? Or, if not a package, how would one generate such data?
> What I would like to do is simulate some sample data for a regression model
> given a set of populat
On Nov 12, 2008, at 8:48 AM, Tom La Bone wrote:
I figured it out. In case anyone else ever has this question --
given the
following output from cenmle:
fit.cen <- cenmle(obs, censored, groups)
fit.cen
Value Std. Errorz p
(Intercept) 1.19473 0.0772 15.4
Oh, I like your answer better than mine! Thanks.
Tom
Richard Cotton wrote:
>
>> I figured it out. In case anyone else ever has this question -- given
> the
>> following output from cenmle:
>>
>> >fit.cen <- cenmle(obs, censored, groups)
>> > fit.cen
>>Value Std. Error
You can just call `c` on your result to flatten the matrix into a
vector. You could also eliminate the for-loops by using the `apply`
function:
pairwise_setequal <-
function(a,b) c(apply(a, 1, function(r){ apply(b, 1, setequal, r ) } ))
But are you sure that is what you want to do? In the ca
> Along similar lines, someone recently posted a script to generate
> a .bib file for all packages installed. It would be useful if someone
> were to implement that script for CRAN and make the resulting
> R-packages.bib file available on the CRAN site.
It would also be useful if citation() added
Dear Maura,
On 12 Nov 2008, at 00:53, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:
> Thank you for your prompt answer.
> The breathing signal observations are the amplitude values as a
> function of time and phase.
> According to our model the hidden states are the different
> breathing typ
Achim Zeileis wrote:
... [ snip ] ...
R> citation("tweedie")
To cite package 'tweedie' in publications use:
Peter K Dunn (2007). tweedie: Tweedie exponential family models. R
package version 1.5.2.
A BibTeX entry for LaTeX users is
@Manual{,
title = {tweedie: Tweedie exponential fam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
That does seem reasonable.
But:
the boot package has several fancy (or at
least let's just say non-naive) methods for
computing confidence intervals that are different
from the simple quantile approach. I haven't
read the Davison and Hinkley book t
> I figured it out. In case anyone else ever has this question -- given
the
> following output from cenmle:
>
> >fit.cen <- cenmle(obs, censored, groups)
> > fit.cen
>Value Std. Errorz p
> (Intercept) 1.19473 0.0772 15.4695 5.58e-54
> groups1 0.00208
Sorry if I am being too naive but if:
after
puro.boot=boot(rs,puro.bf2,R=1000)
#
# we do
#
qq <- apply(puro.boot$t,2,quantile)
matplot(t(qq),type="l")
points(st$conc,st$rate)
points(st$conc,predict(puro1),pch=2,col="red")
#
isn't that what we want graphically and t(qq) gives us the values
obviousl
Dear Maura,
On 9 Nov 2008, at 02:24, Maura E Monville wrote:
> We are trying to build a human respiration model.
> Preliminary analysis of some breathing signals has shown that
> humans breathe
> through switching among
> a finite number of patterns.
> Hidden Markov seems to be the right approa
Gentlemen,
Thank you for all your help.
This list is really amazing.
Following Erik's hint I have managed to find the answer:
complexFn <- function(a,b){
c <- (a+b)/2
return(c)
}
x <- zoo(1:10)
rollapply(x,width=2, function(xx) complexFn(xx[1],xx[2]))
_
1 - 100 of 127 matches
Mail list logo