Hello,
I'm trying to use parallel computing in MuMIn package. It worked a couple
month ago, but now I'm getting the error. Here is a code:
#Data
x1 = rnorm(1000)
x2 = rnorm(1000)
x3 = rnorm(1000)
z = 1 + 0.5*x1 - x2
pr = 1/(1+exp(-z))
y = rbinom(1000, 1, pr)
dataD = cbind(y=y, x1=x1 ,x2=x2, x3=x3
Hello,
Lets say I have 2 vectors:
x1=c("a1"=0,"b3"=2,"e2"=-2);
x2=c("c"=3,"d"=4,"f"=5);
and vector of names in specific order:
N=c("a1","b3","d","e2","c","f")
and I want to combine them to vector C:
C=
a1 b3 d e2 c f
0 2 4 -2 3 5
Basically, just fill vector N with values from vector x1
Hi,
I'm trying to create number of vectors, part of them are binary and part
are continuous. Is there a way in R to generate them with specific
correlation between each pair?
Thank you in advance.
Ariel
--
*I like to pretend I'm alone*. *Completely alone*. *Maybe post-apocalypse
or plague*... *Wha
Hello everyone,
I have general question about parallel programming. I'm doing simulations
that involves bootstrap. For now I'm using parLapply only for bootstrap
part and then function "replicate" for simulations. It is very long
function, so here is a short version:
simfun=function(data,n,alpha
Hi,
I'm trying to create binary variable which distribution conditioned on
other variables. That is what I did,
x1=rnorm(n,0,1);
x2=rnorm(n,0,1);
x3=rnorm(n,0,1);
if(x1+x2-x3>0.25){
t=rbinom(1, 1, prob=0.25)
}else{
t=rbinom(1, 1, prob=0.5)
}
But I always get this the warning:
Warning messag
Hello,
Suppose I have one vector of values or even matrix of those vectors and I
want to calculate q_k(V/k), where V is the vector, k is a quantile and q_k
is empirical k-quantile function. Finally I want to calculate Q_k=min(1,
q_k) for k=(0,1).
Can you please help me with this code?
quantile fu
Hello,
I have a vector of coefficients from backward selection model that looks
like:
[,1]
(Intercept) -0.15
s1[, 1] 2.65
s1[, 2] 1.81
s1[, 5] 2.35
I'd like to get a new vector that contains zeroes for variables that were
not included in the final model. For example
Hello,
I have a data orig.raw that contains 8 predictors and 1 outcome variable.
I'm trying to run simulation (bootstrap) and create, let's say, 10
confidence intervals for coefficients estimated by LASSO. I did it with
regular function replicate, but now I want to do it by using parallel
programm
8 matches
Mail list logo