Displaying 20 results from an estimated 8000 matches similar to: "Hierarchical Power Analysis"
2010 Jun 22
5
Displaying Iteration Count
Hello,
I'm running a very long for loop that usually takes hours. For my own piece
of mind, it would be nice if I could check periodically and see which
iteration the loop is on. A line of code that told R to print the iteration
number every 100 or 200 iterations would be perfect.
Does anyone know something like this? I've never known how to print
anything within a for loop before the
2011 May 17
2
Minimum value by ID
Hello,
I have a longitudinal dataset where each individual has a different number
of entries. Thus, it is of the following structure:
x <- runif(12)
id.var <- factor(c(rep("D1",4),rep("D2",2),rep("D3",3),rep("D4",3)))
dat <- as.data.frame(x)
dat$id.var <- id.var
dat
> dat
x id.var
1 0.9611269 D1
2 0.6738606 D1
3
2011 Sep 23
4
'save' saved object names instead of objects
Hello,
I created an array to hold the results of a series of simulations I'm
running:
d.eta <- array(0,dim=c(3,3,200))
<simulation goes here and populates the array but it's not important>
Then I tried to save the results using this:
save(d.eta,file="D:/Simulation Results/sim 9-23-11 deta")
When I later tried to reload them using this:
d.eta <-
2010 Aug 13
6
Equality of Vectors
Hello,
Is there a way to get a single TRUE or FALSE statement from comparing two
vectors? For example,
c(1,2,3) == c(1,2,3)
produces
TRUE TRUE TRUE
where I would like it to produce only
TRUE
for use in an if statement.
Likewise, when two vectors are not exactly identical (in all elements) I
would like a single FALSE result, as opposed to
c(1,2,3) == c(1,2,5)
TRUE TRUE FALSE
Any ideas?
2011 Jul 01
2
merge function
Hello,
I'm clearly confused about the merge function. In the following
r <- merge(x,y,all.x=T,all.y=F)
my y vector has only unique values (no duplicates). So I don't understand
how this can ever generate an r which is of greater length than x.
I thought the default behavior was only matching rows are included, but
that using all.x=T included rows with unmatched x's as well. If
2011 May 29
1
Setting max. iterations for lmer
Hello,
I hate to ask a question which is directly addressed in the documentation,
but can someone please give me an example of how to change the maximum
number of iterations used by lmer. I'm having a hard time understanding
this:
control a list of control parameters. See below for details.
control
a named list of control parameters for the estimation algorithm, specifying
only
2011 Nov 09
2
Installing binaries from R-Forge
Hello,
I'm attempting to install the splm package from R-Forge.
https://r-forge.r-project.org/R/?group_id=352
The page says, "In order to successfully install the packages provided on
R-Forge, you have to switch to the most recent version of R..." It later
says "To install this package directly within R type:
install.packages("splm",
2010 Nov 22
2
Probit Analysis: Confidence Interval for the LD50 using Fieller's and Heterogeneity (UNCLASSIFIED)
Classification: UNCLASSIFIED
Caveats: NONE
A similar question has been posted in the past but never answered. My
question is this: for probit analysis, how do you program a 95%
confidence interval for the LD50 (or LC50, ec50, etc.), including a
heterogeneity factor as written about in "Probit Analysis" by
Finney(1971)? The heterogeneity factor comes into play through the
chi-squared
2012 Mar 08
1
Panel models: Fixed effects & random coefficients in plm
Hello,
I am using {plm} to estimate panel models. I want to estimate a model that
includes fixed effects for time and individual, but has a random individual
effect for the coefficient on the independent variable.
That is, I would like to estimate the model:
Y_it = a_i + a_t + B_i * X_it + e_it
Where i denotes individuals, t denotes time, X is my independent variable,
and B (beta) is the
2010 Mar 11
1
VAR with contemporaneous effects
Hi,
I would like to estimate a VAR of the form:
Ay_t = By_t-1 + Cy_t-2 + ... + Dx_t + e_t
Where A is a non-diagonal matrix of coefficients, B and C are matricies of
coefficients and D is a matrix of coefficients for the exogenous variables.
I don't think the package {vars} can do this because I want to include
contemporaneous cross-variable impacts.
So I want y1_t to affect y2_t and I
2010 Apr 19
2
ecdf
Hello,
I'd like to plot an empirical cumulative distribution function, except
instead of the fraction of values < x, I'd like the fraction of values > x.
I think this can be done using the ecdf function in {Hmisc}. I installed
the package and loaded it. However, when following the example given in the
documentation, I get an error:
x <- rnorm(100)
ecdf(x,what='1-F')
2010 Jan 07
1
LD50 and SE in GLMM (lmer)
Hi All!
I am desperately needing some help figuring out how to calculate LD50 with a GLMM (probit link) or, more importantly, the standard error of the LD50.
I conducted a cold temperature experiment and am trying to assess after how long 50% of the insects had died (I had 3 different instars (non significant fixed effect) and several different blocks (I did 4 replicates at a time)=
2004 Apr 27
3
se.fit in predict.glm
Hi Folks,
I'm seeking confirmation of something which is probably true
but which I have not managed to find in the documentation.
I have a binary response y={0.1} and a variable x and have
fitted a probit response to the data with
f <- glm( y~x, family=binomial(link=probit) )
and then, with a specified set of x-value X I have used the
predict.glm function as
p <- predict( f, X,
2013 Apr 15
1
Optimisation and NaN Errors using clm() and clmm()
Dear List,
I am using both the clm() and clmm() functions from the R package
'ordinal'.
I am fitting an ordinal dependent variable with 5 categories to 9
continuous predictors, all of which have been normalised (mean
subtracted then divided by standard deviation), using a probit link
function. From this global model I am generating a confidence set of 200
models using clm() and the
2013 Jan 09
1
Need an advise for bayesian estimate
Hi R bayesians,
I need an advise how to resolve the two different estimates applying a
traditional glm (TG) and a bayes glm (BG), and different results depending
on the data formats of response data and the prior specs using bayesglm in
R. I'm not familiar with bayes estimate and my colleague asked me to look
into this because the EPA from France reported a quite different estimates
for
2006 Nov 19
1
problems with axis
hi list!
i'm plotting a probit plot .On x axis i have value of a statistical
variable. on y axis the corresponding normalized representation. I
have this code
plot(vals,perc,axes=F,col="red",pch=19,cex=0.25)
probit.scale.values <-
c(0,0.001,0.01,0.05,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95,0.99,0.999,1)
probit.scale.at <- qnorm(probit.scale.values)
2003 Sep 24
2
probit analysis for correlated binary data
Dear all,
I have a question on the dose-response estimation with clustered/ correlated binary data.
I would like to estimate the hit rate for a certain test at various concentration levels. The test is used
on 5 subjects, and each subject is tested 20 times. If we assume that the 100 samples are
independent, the hit rate estimate is unbiased, but the variance is under-estimated. The other
2003 Nov 06
1
for help about R--probit
Not real data. It was gererated randomly. The original codes are the following:
par(mfrow=c(2,1))
n <- 500
#########################
#DATA GENERATING PROCESS#
#########################
x1 <- rnorm(n,0,1)
x2 <- rchisq(n,df=3,ncp=0)-3
sigma <- 1
u1 <- rnorm(n,0,sigma)
ylatent1 <-x1+x2+u1
y1 <- (ylatent1 >=0) # create the binary indicator
#######################
#THE
2010 Apr 12
1
Strange results from Multivariate Normal Density
Hello,
I'm using dmnorm from the package {mnormt} and getting strange results.
First, according to the documentation, dmnorm should return a vector of
densities, and I'm only getting one value returned (which is what I would
expect). I've been interpreting this as the joint density of all values in
the x vector (which is what I want). Should a vector of densities be
returned, and if
2006 May 06
3
probit analysis
Dear all,
I have a very simple set of data and I would like to analyze them
with probit analysis.
dose event trial
0.0 3 15
1.1 4 15
1.3 4 15
2.0 3 15
2.2 5 15
2.8 4 15
3.7 5 15
3.9 9 15
4.4 8 15
4.8 11 15
5.9 12 15
6.8 13 15
The dose should be transformed with log10().
I use glm(y ~ log10(dose), family=binomial(link=probit)) to
do probit analysis, however, I have to exclude the