search for: v_i

Displaying 17 results from an estimated 17 matches for "v_i".

Did you mean: _i
2007 Oct 16
2
How to speed up multiple for loop over list of data frames
Hi there, I have a multiple for loop over a list of data frames for ( i in 1:(N-1) ) { for ( j in (i+1):N ) { for ( p in 1:M ) { v_i[p] = alist[[p]][i,"v"] v_j[p] = alist[[p]][j,"v"] } rho_s = cor(v_i, v_j, method = "spearman") rho_p = cor(v_i, v_j, method = "pearson" ) iv = c( iv, min(i, j) ) jv = c( jv, max(i, j)...
2007 Oct 23
4
Replace values on seq
...mes answered question), but I have been searching a while and gave up about the following: I have the following, table and data: table <- seq(255, 0, by=-1) data <- c(1,8,...) <--- doesn't matter what's in here Which would be the most efficient way to replace each data value, v_i, by table[v_i + 1] ? And, maybe more important, why is that more efficient? I used this, but I think is not the best option: for (i in 1:length(data)){ data[i] <- table[data[i]+1] } Then used mapply, that seems to work better: f<-function(x){ 255-x } mapply(f, data) Thanks guys in a...
2011 Oct 03
1
minimisation problem, two setups (nonlinear with equality constraints/linear programming with mixed constraints)
...ample. In principle the problem can be solved by linear programming, so I include code for my attempt at this via RGLPK. It says that there is no feasible solution, but the solution is known analytically in the case below. Here is the precise problem: Minimise, over 100?1 real vectors v, Max_i(|v_i|) such that X'v=e_2, where X is a given 100?2 matrix and e_2 =(0,1)'. The v_i are the elements of v. I have put the actual X matrix at the end of this post, along with a feasible starting value for v. The correct minimum is 0.01287957, obtained with v_i=0.01287957 for i<=50 and v_i...
2005 Feb 15
1
shrinkage estimates in lme
Hello. Slope estimates in lme are shrinkage estimates which pull the OLS slope estimates towards the population estimates, the degree of which depends on the group sample size and the distance between the group-based estimate and the overall population estimate. Although these shrinkage estimates as said to be more precise with respect to the true values, they are also biased. So there is a
2009 Oct 24
1
dev.copy(postscript,...) generates a disrupted string
...eta) tb gr ... The problem is, that the program which converts the created .ps file to a .tex file does not understand this disrupted string. Why does the dev.copy(postscript,..)-command produce such an output and how can I prevent it from doing so? If I use a different string such as "\\v_i", then everything works fine and "\\v_i" appears as a whole string in the postscript file. So why does it not work for "\\vartheta"? Thanks in advance, Marius ====Code========================================================== remove(list=objects()) library(lattice)...
2006 Jun 30
1
lme and SAS Proc mixed
...and 16 probenos nested within each of the probeids. I have specified in the SAS Proc Mixed procedure that the variance-covariance structure is to be compound symmetric. Therefore, the variance-covariance matrix is a block diagonal matrix of the form, V_1 0 0 0 V_2 0 0 0 V3 where each V_i represents a RefSeqID. Moreover, for each V_i the structure within the block is v_{11} v{12} v_{21} v{22} where v_{11} and v_{22} are different probeids nested within the refseqid, and so are correlated. The structure of both v_{11} and v_{22} are compound symmetric, and v_{12} and v{21} con...
2006 Jun 30
0
SAS Proc Mixed and lme
...and 16 probenos nested within each of the probeids. I have specified in the SAS Proc Mixed procedure that the variance-covariance structure is to be compound symmetric. Therefore, the variance-covariance matrix is a block diagonal matrix of the form, V_1 0 0 0 V_2 0 0 0 V3 where each V_i represents a RefSeqID. Moreover, for each V_i the structure within the block is v_{11} v{12} v_{21} v{22} where v_{11} and v_{22} are different probeids nested within the refseqid, and so are correlated. The structure of both v_{11} and v_{22} are compound symmetric, and v_{12} and v{21} cont...
2010 Feb 23
1
function on all pairs of vector entries
...Is there a way in R to compute the multivariate normal density of every pair of entries in a vector efficiently instead of using for loop? For example Suppose I have a vector a=c(v_1,...,v_p)=c(0.5343909, -0.7784353, -0.0568370, 1.8772838, -1.3183407, 0.8227418,...) I want to compute density(v_i, v_j) for every pair of entries (i,j) (i!=j) in a. The joint bivariate distribution is known to be the same for each pair. Thanks a lot! Ivon _________________________________________________________________ [[elided Hotmail spam]] [[alternative HTML version deleted]]
2007 Feb 28
1
Efficient way to repeat rows (or columns) of a matrix?
Hi. If I have a vector, v_1, and another vector of positive integers, i_1, the same length as v_1, then rep(v_1,i_1) will repeat v_i[j] exactly i_1[j] times, like so: >rep(c(1,2,3),c(3,2,1)) [1] 1 1 1 2 2 3 > I'd like to do the same sort of thing where I replace v_1 with a matrix, and the jth row of the matrix is repeated i_1 times. Obviously, I could do this with for loops, like the following: >(ma1=matrix(1:...
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
2008 Feb 13
1
model construction
I buy flowers at a local market on a fairly regular basis. The flower vendors post their prices and if I want to buy only one or two flowers I will generally get the posted price. From time to time I want to buy large quantities of flowers, and sometimes a vendor will give me a better price than their posted price for the bulk order, but more often I have to offer them a higher price than the
2007 Apr 14
6
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >> I'm definitely interested in improving coalescing and it sounds like >> this would fall under that work. Do you have references to papers >> that talk about the various algorithms? > > Some suggestions: > > @InProceedings{Budimlic02, > AUTHOR = {Zoran Budimlic and Keith D. Cooper and Timothy
2005 Feb 24
0
KalmanXXXX and deJong-Penzer statistic?
...tp://www.lse.ac.uk/collections/statistics/documents/researchreport34.pdf 'Diagnosing Shocks in TIme Series', de Jong and Penzer construct a statistic (tau) which can be used to locate potential shocks. [p15, Theorem 6.1 and below]. They also state that all the components of that statistic (v_i, F_i, r_i, N_i) 'are computed with Kalman Filter Smoother applied to the null model'. Also, as I understand, that part has been implemented in one of the S packages , SsfPack, as the book on that states on p 531 'the standardized smoothed disturbances may be interpreted as t-statistics...
2010 Feb 05
3
metafor package: effect sizes are not fully independent
In a classical meta analysis model y_i = X_i * beta_i + e_i, data {y_i} are assumed to be independent effect sizes. However, I'm encountering the following two scenarios: (1) Each source has multiple effect sizes, thus {y_i} are not fully independent with each other. (2) Each source has multiple effect sizes, each of the effect size from a source can be categorized as one of a factor levels
2008 Aug 29
3
extract variance components
HI, I would like to extract the variance components estimation in lme function like a.fit<-lme(distance~age, data=aaa, random=~day/subject) There should be three variances \sigma_day, \sigma_{day %in% subject } and \sigma_e. I can extract the \sigma_e using something like a.fit$var. However, I cannot manage to extract the first two variance components. I can only see the results in
2004 Jul 02
3
How to get the normal direction to a plane?
Dear All Maybe the following is a stupid question. Assume I have 3 coordinate points (not limited to be in 2D or 3D space) a, b, c. It is known that these 3 points will define a plane. The problem is how to get the normal direction that is orthogonal to this plane. Is there an easy way to calculate it using the values of a, b, and c? Thanks for any point or help on this. Fred
2009 Jul 23
1
[PATCH server] changes required for fedora rawhide inclusion.
...{&HN5M=#_%38y-BJlH&SxbqMeAq8k5R~pNPyw%apL3rbfYw5{QZIz z`g2)VQvh^x$Nt(r*U0bgV>rk{!yDc$HVYDyC+=KEM78#EHa+2_XccNQEGA1xj9uX= zuYN1u(DBA8zB%PzR)p7|flUYsqNpR|&&gP^g!o9p7MD|DXZPx5H|GINE*!{W=8eY% z=@dt>K_()`hDk{U;ljxV);)Cn*KuAARs$6eUaLI<a5n|;INvM%tFlr=W3hF5OnH&p zdcVs%6*FoYvMbf`V_i!}k#jvJ-l3#Fce$Wc5J#i!hPrUj3&6>;Vy^r#@BZtdoR-Z> z6&A!-Cym-sPBo3g4vY6qHjgJMhMDUa;zjpy?Y~Kh|B{rLQrgu9Q2m7okr%8#N>zj< zTZO_(RWS-|jFtMc&Ba9w3xQTL82ZZ$0f~;k$q<;gEc(mJ&GmQn)C+*bpj<F<clD${ zx4XOque^#|_hM)&fFnuJmTyv(KcD6gtP!P$wDfYY-Z>a*kb48LIC%M1dh$r;-0jyv z_7M7Of...