Displaying 20 results from an estimated 3000 matches similar to: "Confidence intervals of log transformed data"
2003 Oct 22
1
: Prediction interval for a Gaussian family log-link model
Hi there fellow R-users,
Can anyone tell me how to build a prediction interval for a gaussian
log-link model for the reponse variable??
I can find the standard error of the predictions but I cant seem to find the
prediction interval. Is there a way I can calculate the
prediction interval from the standard errors??
Here's the example:
logX<-rnorm(100)
2007 Nov 14
2
Generating log transformed random numbers
Dear R users,
My question is that how it is possible to generate some random numbers using rnorm( ) function but in log transformed values.
Thank you,
Tobias
---------------------------------
[[alternative HTML version deleted]]
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list
I'm simulating logistic regression data with a specified odds ratio
(beta) and have a problem/unexpected behaviour that occurs.
The datasets includes a lognormal exposure and diseased and healthy
subjects.
Here is my loop:
ors <- vector()
for(i in 1:200){
# First, I create a vector with a lognormally distributed exposure:
n <- 10000 # number of study subjects
2017 Jan 11
2
bug with strptime, %OS, and "."
On Tue, Jan 10, 2017 at 08:13:21PM -0600, Dirk Eddelbuettel wrote:
>
> On 10 January 2017 at 17:48, frederik at ofb.net wrote:
> | Hi R Devel,
> |
> | I just ran into a corner case with 'strptime'. Recall that the "%OS"
> | conversion accepts fractional seconds:
> |
> | > strptime("17_35_14.01234.mp3","%H_%M_%OS.mp3")$sec
> |
2012 May 15
9
help
1. Emma is performing an experiment that requires individual handling of some animals. The sizes of the animals are lognormally distributed: The natural logarithms of their sizes has a normal distribution with mean 3 and standard deviation 0.4. The time (in minutes) it takes to handle each animal is given by
10 + s · 1.5 + eε for animals with s ≤ 20 20 + s · 0.8 + eε for animals with s > 20
2017 Jan 11
4
bug with strptime, %OS, and "."
Hi R Devel,
I just ran into a corner case with 'strptime'. Recall that the "%OS"
conversion accepts fractional seconds:
> strptime("17_35_14.01234.mp3","%H_%M_%OS.mp3")$sec
[1] 14.01234
Unfortunately for my application it seems to be "greedy", in that it
tries to parse a decimal point which might belong to the rest of the
format:
>
2011 Jun 06
2
Can R do zero inflated gamma regression?
Hi, Dear R-help
I know there are some R package to deal with zero-inflated count data. But I
am now looking for R package to deal with zero-inflated continuous data.
The response variable (Y) in my dataset contains a larger mount of zero and
the Non-zero response are quite right skewed. Now what i am doing is first
to use a logistic regression on covariates (X) to estimate the probability
of Y
2008 Dec 17
1
Confidence intervals of log transformed data
Hello,
I was wondering if you could tell me how to calculate 95% confidence
intervals for lambda for a box-cox power transformation.
Best wishes
Eoin
[[alternative HTML version deleted]]
2011 Nov 23
2
Bar charts, frequencies known, intervals of varying width
Hi
I would like to plot bar charts in a particular way. The intervals are not
evenly distributed and are in a data frame column called size and the
relative frequencies are in a second column called mass. Both size and mass
are continuous ratio data to all intents and purposes. The data actually
represents sieving of sand where $size is sieve aperture and where $mass is
the amount remaining on
using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval
2010 Oct 15
2
using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval
Hi,
I would like to write a function that finds parameters of a log-normal
distribution with a 1-alpha CI of (x_lcl, x_ucl):
However, I don't know how to optimize for the two unknown parameters.
Here is my unsuccessful attempt to find a lognormal distribution with
a 90%CI of 1,20:
prior <- function(x_lcl, x_ucl, alpha, mean, var) {
a <- (plnorm(x_lcl, mean, var) - (alpha/2))^2
b
2010 Dec 16
3
How to save & play back an entire R session?
I know that at the end of an R session I'm given the option to save
the current *state* of the session.
But I would like to save the entire sequence of inputs that took place
during the session, so that I can play them back later, and not only
be left in the same state I was at the time of saving the session, but
be able to see the entire history of the session (inputs and outputs).
(This is
2009 May 21
2
Naming a random effect in lmer
Dear guRus:
I am using lmer for a mixed model that includes a random intercept for a
set of effects that have the same distribution, Normal(0, sig2b). This set
of effects is of variable size, so I am using an as.formula statement to
create the formula for lmer. For example, if the set of random effects has
dimension 8, then the lmer call is:
Zs<-
2012 Nov 22
1
Optimizing nested function with nlminb()
I am trying to optimize custom likelyhood with nlminb()
Arguments h and f are meant to be fixed.
example.R:
compute.hyper.log.likelyhood <- function(a, h, f) {
a1 <- a[1]
a2 <- a[2]
l <- 0.0
for (j in 1:length(f)) {
l <- l + lbeta(a1 + f[j], a2 + h - f[j]) - lbeta(a1, a2)
}
return(l)
}
compute.optimal.hyper.params <- function(start, limits, h_, f_) {
result
2010 Aug 16
2
When to use bootstrap confidence intervals?
Hello, I have a question regarding bootstrap confidence intervals.
Suppose we have a data set consisting of single measurements, and that
the measurements are independent but the distribution is unknown. If
we want a confidence interval for the population mean, when should a
bootstrap confidence interval be preferred over the elementary t
interval?
I was hoping the answer would be
2006 Dec 15
1
xyplot: logarithmic y-axis
This should be simple but I am struggling. I like to easily switch in xyplot
between a linear or logarithmic y-axis by setting a logical flag logY to
False or True. This switch changes the scales argument of xyplot. I found
out that the original two-dimentional data (Conc vs Time in my case) are
converted to log10(Conc) if log=TRUE in scales, but it appears that
functions like panel.curve need to
2003 Jul 25
5
named list 'start' in fitdistr
Hi R lovers!
I'd like to know how to use the parameter 'start' in the function
fitdistr()
obviously I have to provide the initial value of the parameter to optimize
except in the case of a certain set of given distribution
Indeed according to the help file for fitdistr
" For the following named distributions, reasonable starting values
will be computed if `start'
2010 Jan 12
1
barplot: border color when stacked
Dear R-users,
I am using R version 2.10.1 under windows.
In a barplot, I want to mark one of the bars with a special border color.
For example:
barplot(c(3, 7, 11), border = c(NA, "red", NA))
But how to do this when the bars are stacked?
for example:
barplot(matrix(1:6, ncol=3)) # border of second bar (i.e. the one with total height = 7) should be red again, I try:
barplot(matrix(1:6,
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi,
I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2007 Sep 07
1
How to obtain parameters of a mixture model of two lognormal distributions
Dear List,
I have read that a lognormal mixture model having a pdf of the form
f(x)=w1*f1(x)+(1-w1)*f2(x) fits most data sets quite well, where f1
and f2 are lognormal distributions.
Any pointers on how to create a function that would produce the 5
parameters of f(x) would be greatly appreciated.
> version
_
platform i386-pc-mingw32
arch i386
os
2006 Nov 02
2
poly() question
Besides the primary citation, "Kennedy, W. J. Jr and Gentle, J. E. (1980)
Statistical Computing Marcel Dekker." (which is $300 and my library doesn't
have it), is there any other documentation on how to take a poly() object
and predict "by hand" new data? E.g. What do those coefficients actually
mean ("The orthogonal polynomial is summarized by the coefficients, which