Displaying 20 results from an estimated 4000 matches similar to: "Newbie problem: Vectorizing a minimum function with constraints"
2007 Apr 22
1
How to add e.g. lines to a zoo plot?
Hi all,
a problem I encounter again and again: I plot a zoo object using "plot"
and then want to add lines or points to this plot.
I usually circumvent this problem by adding artificial coloumns to the
zoo object before plotting, but I am sure there's a better solution.
To be specific: Assume I did
x <-
2007 Mar 12
1
How to avoid a for-loop?
Hi all,
as I am trying to move slowly from just "working" to "good" code, I'd
like to ask if there's a smarter way than using a for-loop in tasks like
the example below.
I need to obtain the extrema of the cumulated sum of a detrended time
series. The following code is currently used, please have a look at the
comments for my questions and remarks:
system.time({
X
2001 Dec 13
3
Access denial
Hi,
My name is Tom Faulhaber. I am the network administrator at a small company
in Providence,RI.
I am running Samba 2.2.2 on a Redhat 6.1 machine on a Novell 4.21 network.
The workstations are Win98SE. The Linux box is being used for the company
intranet (Apache 1.3.22).
Everything runs fine, however I am completely stumped on one issue (so far).
That issue is: network connectivity. If I
2004 Dec 07
3
Question about e1/digium
Hi all I am beginning in asterisk and am making tests with an ata-186.
For the time being the tests are going well, however have a doubt.
I am thinking about using a canal e1 with plate digium.
Assuming that the company of telecommunications supplies e1 with 30 canals
and numeration to me 4000-0001 4000-0029. she is possible to configure
asterisk
in way that somebody of is dials 4000-0025, to
2008 Mar 12
1
generalized linear mixed models with a beta distribution
Greetings,
I am interested in using a generalized linear mixed model with data that
best fits a beta distribution (i.e., the data is bounded between 0 and 1
but is not binomial). I noticed that the beta distribution is not
listed as an option in the "family objects" for glmmPQL or lmer. I
found a thread on this listserve from 2006 ("[R] lmer and a response
that is a
2006 Feb 06
3
power and sample size for a GLM with poisson response variable
Hi all,
I would like to estimate power and necessary sample size for a GLM with
a response variable that has a poisson distribution. Do you have any
suggestions for how I can do this in R? Thank you for your help.
Sincerely,
Craig
--
Craig A. Faulhaber
Department of Forest, Range, and Wildlife Sciences
Utah State University
5230 Old Main Hill
Logan, UT 84322
(435)797-3892
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as
expected
n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes
severe problems
I cannot interrupt using ESC and I finally have to resort to the Windows
Task manager to kill the R session.
A friend of mine told me that he faced similar problems under Unix.
--please do not edit the information below--
Version:
2000 Mar 14
2
Bug in sub? (PR#487)
I suspect that there is bug in sub when using "?":
> string_"This is a bug!"
> sub("!", ", or isn't it?", string)
[1] "This is a bug, or isn't it?"
> string_"This is a bug?"
> sub("?", ", or isn't it?", string)
[1] "This is a bug?"
Regards,
*** D.Trenkler ***
2002 May 22
2
Bug in pexp (PR#1590)
I wonder if something like this has been reported
before:
> pexp(85:86,0.438)
[1] 1 -Inf
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 1
minor = 5.0
year = 2002
month = 04
day = 29
language = R
Windows NT 4.0 (build 1381) Service Pack 6
Search Path:
.GlobalEnv,
2001 Nov 22
1
Bug in dev.print? (PR#1179)
Dear "Debuggers",
please have look a the following:
> plot(0:1,0:1,type="n")
> points(c(0,0.5,1),c(0,0.5,1))
> dev.print(device = postscript, width=5 , height=5, file="test1.ps")
windows
2
># This worked
> dev.print(device = pdf, width=5 , height=5, file="test1.pdf")
windows
2
># That also
>
2000 Jul 26
1
Bug in stem? (PR#617)
# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
# r-bugs@biostat.ku.dk
#
######################################################
"b" <- c(-5.5, -4, -2.3, -1.5, -1, -0.5, -0.41, -0.33, -0.29,
-0.26, -0.2,
2004 Jul 15
1
GHK simulator
Dear R-community,
not to re-invent the wheel I wonder if someone of you
has ever written a function to compute the GHK smooth recursive
simulator to estimate multivariate normal probabilities. See for instance
page 194 of
@BOOK{Greene97,
author = {William H. Greene},
year = 1997,
title = {Econometric Analysis},
edition = {3rd},
publisher = {Prentice-Hall},
address = {New Jersey
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My
problem was not only constructing the "constraints" vector but, for my
particular situation (Poisson regression, two groups, sample sizes of
(1081,3180), I get very different results using asypow package compared
to my other (home grown) approaches.
library(asypow)
pois.mean<-c(0.0065,0.0003)
info.pois <-
2007 Mar 26
3
Is the random number generator biased?
Hi all,
in order to verify some results I did the following test in R (2.4.1.,
windows system):
X <- cumsum(rnorm(1000000))
for (i in 1:1000) {
tmp <- seq(1,length(X),by=i)
X.coarse <- X[tmp]
X.return <- diff(X.coarse)
X.scale.mean[i] <- mean(X.return)
}
plot(X.scale.mean,type="l")
As X is a random walk with
2000 Dec 17
1
AW: Permutations
Niels Waller wrote:
> Does anyone know of an R (or S-PLUS) function for delineating all possible
> combinations and permutations?
The following function delivers all permutations of 1:n.
all.perm <- function(n) {
p <- matrix(1, ncol = 1)
for (i in 2:n) {
p <- pp <- cbind(p, i)
v <- c(1:i, 1:(i - 1))
for (j in 2:i) {
v <- v[-1]
2001 Sep 25
1
Bug in boxplot.stats?
Is this a bug?
>"xx" <- c(50, 79, 120, 78, 90, 100, 78, 80,
+ 90, 80, 60, 39, 90, 85, 140, 100, 80, 80)
> boxplot.stats(xx)$stats
[1] 60 78 80 90 100
> boxplot.stats(0.1*xx)$stats
[1] 7.8 7.8 8.0 9.0 10.0
I suppose the way the numbers in 0.1*xx are internally stored may
cause this problem:
> formatC(0.1*xx[2],format="f",digits=16)
[1]
2008 Mar 17
1
generalized linear mixed models with a beta distribution [Sec=Unclassified]
Craig A Faulhaber wrote:
>I am interested in using a generalized linear mixed model with data
> that best fits a beta distribution (i.e., the data is bounded between
> 0 and 1 but is not binomial).
..
>For clarification, here's what I'm trying to model:
>I have a beta-distributed response variable (y). I have a fixed-effect
>explanatory variable (treatment),
2001 Oct 05
3
3dim histogram?
Hello all,
I wonder if there is a package including a program to display a 3dim
histogram.
Thanks.
--- D.Trenkler ---
****************************************************************************
*****
Dr. Dietrich Trenkler (dtrenkler at nts6.oec.uni-osnabrueck.de)
Statistik / Empirische Wirtschaftsforschung
Universitaet Osnabrueck
Rolandstrasse 8
2008 Aug 11
1
Unwanted carriage returns storing dataframes with dbWriteTable
If I save a dataframe with a character-typed last column to a relational
database with dbWriteTable, the values in the last column of the
resulting table in the database will have a '\r' (carriage return)
appended. If I read back the dataframe with dbReadTable the last column
in the resulting dataframe has also '\r' appended (see protocol below).
Setting or unsetting sql-mode
2000 Mar 07
2
AW: anova-bug in R-version 1.0.0? (PR#470)
I think I've discovered what went wrong.
My workspace included a function wilcox.test formerly copied from
ctest. Now ctest ist part of the distribution and because of that I
always got the message:
[Previously saved workspace restored]
Error in autoload("wilcox.test", "ctest") :
Object already exists
I didn't take care of this message. Now I removed