Displaying 4 results from an estimated 4 matches for "n_k".
Did you mean:
n_
2006 May 20
1
(PR#8877) predict.lm does not have a weights argument for newdata
Dear R developers,
I am a little disappointed that my bug report only made it to the
wishlist, with the argument:
Well, it does not say it has.
Only relevant to prediction intervals.
predict.lm does calculate prediction intervals for linear models from
weighted regression, so they should be correct, right?
As far as I can see they are bound to be wrong in almost all cases, if
no weights
2000 May 03
0
Combinatorics for nonparametric tests
...t;)
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]
p_rbind(p,pp[,v[1:i]])}}
p}
Until now I hesitated to dwell on writing functions to generate all
n!/(k!(n-k)!) k-combinations of an n-element set or more generally all
n!/(k_1!k_2!...n_k!) choices of placing n objects into k boxes where
box j has n_j objects.
Not intending to re-invent the wheel I turn to the R community to ask
if someone has already written these functions.
Any help is thankfully appreciated.
--- D.Trenkler ---
**********************************************...
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings,
I have the following?
Problem:
Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k.
Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with
their probabilities.
I tried several approaches:
(A) Convolution:
each X_j is approximated with Y_j=X_j+Z, where Z is
an N(0,sigma) variable with small sigma. Then Y_j is a probability mixture of the normal
variables N(x_j,sigma...
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
...sh.console();
print(D[p1]);
myReject.pooled = myReject.pooled.1 = MAX.pooled = rep(-1,nsim);
gsim = 0; ## good simulations
for(i in 1:nsim)
{
doubleBreak = F;
print(paste(i, " of ",nsim)); flush.console();
tData = NULL;
pooledNum = matrix(0,nrow=k,ncol=k); ##numerator as weighted sum AS
(n_k-1)cov.scaled
pooledDen = 0; ##denominator as correction AS N-k
#Sigma_pooled = ((omit.1-1)*summary.nls.1$cov.scaled +
(omit.2-1)*summary.nls.2$cov.scaled +
(omit.L-1)*summary.nls.L$cov.scaled)/(sum(omit.1,omit.2,omit.L)-L);
for(j in 1:L)
{
Y = numeric(N_i);
X = createDomain(Xval,N_i); noise = rn...