search for: n_i

Displaying 20 results from an estimated 36 matches for "n_i".

Did you mean: _i
2007 Apr 12
1
LME: internal workings of QR factorization
...\ / the text indicates that the Q-R factorization is limited to the first q columns of the augmented matrix on the left. If one plunks the first q columns of the augmented matrix on the left into a qr factorization, one obtains an orthogonal matrix Q that is (n_i + q) x q and a nonsingular upper triangular matrix R that is q x q. While the text describes R as a nonsingular upper triangular q x q, the matrix Q_(i) is described as a square (n_i + q) x (n_i + q) orthogonal matrix. The remaining columns in the matrix to the right are defined by applying trans...
2009 Apr 21
2
Changing the binning of collected data
Dear All, Apologies if this is too simple for this list. Let us assume that you have an instrument measuring particle distributions. The output is a set of counts {n_i} corresponding to a set of average sizes {d_i}. The set of {d_i} ranges from d_i_min to d_i_max either linearly of logarithmically. There is no access to further detailed information about the distribution of the measured sizes, but at least you know enough to plot n(d_i) (number of counts as a fun...
2004 Apr 18
2
lm with data=(means,sds,ns)
Hi Folks, I am dealing with data which have been presented as at each x_i, mean m_i of the y-values at x_i, sd s_i of the y-values at x_i number n_i of the y-values at x_i and I want to linearly regress y on x. There does not seem to be an option to 'lm' which can deal with such data directly, though the regression problem could be algebraically expressed in these terms. One way of fudging it would be to replace each m_i by a set of...
2007 Apr 12
0
LME: internal workings of QR factorization --repost
...\ / the text indicates that the Q-R factorization is limited to the first q columns of the augmented matrix on the left. If one plunks the first q columns of the augmented matrix on the left into a qr factorization, one obtains an orthogonal matrix Q that is (n_i + q) x q and a nonsingular upper triangular matrix R that is q x q. While the text describes R as a nonsingular upper triangular q x q, the matrix Q_(i) is described as a square (n_i + q) x (n_i + q) orthogonal matrix. The remaining columns in the matrix to the right are defined by applying t...
2008 Jun 02
1
Italics in plot main title
Hi, I am drawing several plots and want to have italics in a main title; this is easy with expression(). However, I want also to add a value to it, say n_i, that depends on an ith plot. For this I am using paste(). An example: n_i = 10, 20, 30; I want to draw a plot for each i with the title: "Relative efficiency for sample size n = n_i", where n should be in italics, and of course n_i is not specified by value. The expression() does not wor...
2013 Mar 22
1
Integration of vector syntax unknown
Hello, I'm very new to using R, but I was told it could do what I want. I'm not sure how best to enter the information but here goes... I'm trying to transfer the following integral into R to solve for ln(gamma_1), on the left, for multiple instances of gamma_i and variable N_i. gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000, 0.44000000, 0.62566845) N_i (N_1 or N_2) is between 0 and 1 so that N_1+N_2=1, so if N_1=(0,.166,.180,.250,.325,.374), then N_2=(1.000, 0.834, 0.820, 0.750, 0.675, 0.626) a_i (a_1 or a_2) So, for gamma_i (in this case gamma_2),...
2010 Dec 15
4
Generacion de binomiales correlacionadas
...istribucion binomial bivariada en la que hay _cierto_ grado de correlacion (denotemoslo rho). Podria por favor alguien indicarme como hacerlo en R? Este es el contexto. Supongamos que se tienen dos experimentos en los que la variable respuesta _sigue_ una distribucion binomial, i.e., X_i ~Binomial(n_i, p_i), i=1,2 y que, por ahora, n_i y p_i son conocidos. El interes principal es calcular T = P(X_1=1, X_2=1). Si las X_i''s fueran independientes (caso 1), seria suficiente generar binomiales con los parametros correspondientes a cada tipo de experimento (via rbinom) y calcular lo que se n...
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
...f the 100 simulations, only 53 are good simulations because we don't have enough data for nls or chol2inv to work correctly. monte {x: ########################################################################################### ## case I ## EQUAL SAMPLE SIZES and design points nsim = 100; N_i = M_i = 10; ## also try (10, 30, 50, 100, 200) r = M_i / N_i; X.start = 170; # 6 design points, at 170,180,190, etc. where each point has N_i elements X.increment = 10; X.points = 6; X.end = 260; Xval = seq(X.start,length.out=X.points,by=X.increment ); Xval = seq(X.start,X.end,length.out=X.points)...
2002 Dec 10
3
clogit and general conditional logistic regression
...ct." This suggests that its usefulness is confined to the sort of data which arise in survival/proportional hazard applications. My question is: is 'clogit' capable of a general conditional logistic analysis? E.g. given a set of data on binomial experiments with Y=1 r_i times out of n_i, associated with levels A_i and B_i of factors A and B at N_A and N_B levels, would clogit(Y ~ A+B, method=c(Exact")) generate something sensible containing the results of a standard exact conditional logistic regression of Y on A and B? With thanks, Ted. -------------------------------...
2007 Mar 05
3
Mixed effects multinomial regression and meta-analysis
R Experts: I am conducting a meta-analysis where the effect measures to be pooled are simple proportions. For example, consider this data from Fleiss/Levin/Paik's Statistical methods for rates and proportions (2003, p189) on smokers: Study N Event P(Event) 1 86 83 0.965 2 93 90 0.968 3 136 129 0.949 4 82 70 0.854 Total
2005 Jun 15
2
need help on computing double summation
...; Suppose I have the following data set: > > id x y > 023 1 2 > 023 2 5 > 023 4 6 > 023 5 7 > 412 2 5 > 412 3 4 > 412 4 6 > 412 7 9 > 220 5 7 > 220 4 8 > 220 9 8 > ...... > Now I want to compute the following double summation: sum_{i=1}^k sum_{j=1}^{n_i}(x_{ij}-mean(x_i))*(y_{ij}-mean(y_i)) i is from 1 to k, indexing the ith subject id; and j is from 1 to n_i, indexing the jth observation for the ith subject. in the above expression, mean(x_i) is the mean of x values for the ith subject, mean(y_i) is the mean of y values for the ith subject. I...
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
Dear R users, I?m a graduate students and in my master thesis I must obtain the values of the parameters x_i which maximize this Multinomial log?likelihood function log(n!)-sum_{i=1]^4 log(n_i!)+sum_ {i=1}^4 n_i log(x_i) under the following constraints: a) sum_i x_i=1, x_i>=0, b) x_1<=x_2+x_3+x_4 c)x_2<=x_3+x_4 I have been using the ?ConstrOptim? R-function with the instructions I report below, and I have tried to implement them with different values of ?n?. BUT I have enc...
2006 Nov 21
3
Fitting mixed-effects models with lme with fixed error term variances
.... I tried to fit the following model: Yhat_i = X beta + u_i + e_i where Yhat is a direct estimator of the target variable, X, the area- level covariates, u_i the random effects independent and distributed as N(0, sigma2_u) and e_i the 'error' terms, which are distributed as N(0, sigma2_e/n_i), where n_i is the sample size in area i. This model should be unidentifiable because we have one observation per group and we have to estimate two area level terms: u_i and e_i. But, to my surprise, I have been able to fit that model using lme and get sensible results. Am I missing something h...
2011 Aug 31
2
Getting the values out of histogram (lattice)
Hi, ? I have a relatively big dataset and I want to construct some histograms using the histogram function in lattice. One thing I am interested in is to look at differences between density and percent. I know I can use the hist function but it seems that this function gives sometimes some wrong answers and the density is actually a percent since it is calculated as counts in the bin divided by
2005 Jun 14
1
within and between subject calculation
Dear helpers in this forum, I have the following question: Suppose I have the following data set: id x y 023 1 2 023 2 5 023 4 6 023 5 7 412 2 5 412 3 4 412 4 6 412 7 9 220 5 7 220 4 8 220 9 8 ...... and i want to calculate sum_{i=1}^k sum_{j=1}^{n_i}x_{ij}*y_{ij} is there a simple way to do this within and between subject summation in R?
2012 Jan 18
1
Non-linear Least Square Optimization -- Function of two variables.
...perform non-linear fittings. However, I have always dealt with a function of a single variable. Is there any difference if the function depends on two variables? To fix the ideas, please consider the function f(R,N)=(a/(log(2*N))+b)*R+c*N^d, where a,b,c,d are fit parameters. For a set of values {N_i, R_i}, i=1,2,.....etc... can I use minpack as for the case of function of a single variable? Should I instead resort to another package? Any suggestion is welcome. Many thanks Lorenzo
2012 Dec 10
1
Long equation in documentation
...ormula: \deqn{Cov(r_{ist}, r_{iuv})= [.5\rho_{ist}\rho_{iuv}(\rho_{isu}^2 + \rho_{isv}^2 + \rho_{itu}^2 + \rho_{itv}^2) + \rho_{isu}\rho_{itv}+ \rho_{isv}\rho_{itu}-(\rho_{ist}\rho_{isu}\rho_{isv} + \rho_{its}\rho_{itu}\rho_{itv}) + \rho_{ius}\rho_{iut}\rho_{iuv} + \rho_{ivs}\rho_{ivt}\rho_{ivu}]/n_i} How can I break the formula and optionally indent the second lower piece; though I'd settle for break it right now? Tyler Rinker Note: Cross posted here after no viable answer on stackoverflow: http://stackoverflow.com/questions/13780190/break-long-formula-r-documentation Plain txt fil...
2005 Jan 18
1
a question about linear mixed model in R
...s only unusual in that one random effect is applied only to some of the observations (I have an indicator variable that specifies which observations have this random effect). The model is: X_hijk = alpha_h + h * b_i + r_(ij) + e_hijk , where h = 0 or 1 (indicator) i = 1, ..., N j = 1, ..., n_i k = 1, ..., K alpha is fixed, and the rest are random. I'm willing to assume b, r, and e are mutually independent and normal with var(b) = sigma^2_b, var(r) = sigma^2_r, and var(e) = sigma^2. Any help in writing this model in lme() would be greatly appreciated. Thanks, Chung Cheng
2005 Feb 21
0
want to call R from aplatform written i strict ANSI C
..._ptr *SHAREX_PROB; IVECTOR SUPER_FLAG = &(INT_STATUS[16]); IVECTOR ALLOCATION_SWITCH = &(INT_PROTOCOL[30]); extern void compare_NVAR(int n1,int n2,int n3,char *stage); /* end of global definitions */ void evaluator(DVECTOR w,double Penalty,double *gf,double *F,double *Dev) { int i,n,n_i,n_x,n_d,m_f,ACCELERATE; ACCELERATE=INT_STATUS[0]; REAL_STATUS[4] += 1.0; /* number of evaluator() calls */ n = min(SHAREX_PROB->n,*(TASK.NVAR)); n_i = min(SHAREX_PROB->n_i,*(TASK.NVAR)); n_x = min(SHAREX_PROB->n_x,*(TASK.NVAR)); n_d = min(SHAREX_PROB->n_d,*(TASK.NVAR)); m_f...
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