search for: m_y

Displaying 20 results from an estimated 24 matches for "m_y".

Did you mean: _y
2012 Feb 17
2
(subscript) logical subscript too long in using apply
Dear ALL I have this function in R: func_LN <- function(data){ med_ge <- matrix(c(rep(NA,nrow(data)*ncol(data))), nrow = nrow(data), ncol=ncol(data), byrow=TRUE) T <- matrix(c(rep(NA,length(n)*ncol(data))), nrow = length(n), ncol=ncol(data), byrow=TRUE) Tdiff<- matrix(c(rep(NA,length(n)*ncol(data))), nrow = length(n), ncol=ncol(data), byrow=TRUE) T1<- c(rep(NA,ncol(data)))
2009 May 14
1
automated polynomial regression
Dear all - We perform some measurements with a machine that needs to be recalibrated. The best calibration we get with polynomial regression. The data might look like follows: > true_y <- c(1:50)*.8 > # the real values > m_y <- c((1:21)*1.1, 21.1, 22.2, 23.3 ,c(25:50)*.9)/0.3-5.2 > # the measured data > x <- c(1:50) > # and the x-axes > > # Now I do the following: > > m_y_2 <- m_y^2 > m_y_3 <- m_y^3 > mylm <- lm(true_y ~ m_y + m_y_2 + m_y_3) ; mylm Call: lm(formula = true_y ~...
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
2011 Jun 15
1
Reshaping data with xtabs reorders my rows
Dear, I have a data frame melted from a list of matrices (melt from reshape package), then I impute some missing values and then want to tabulate the data again to the array (or list, doesn't matter) of matrices form. However when using xtabs function it orders my rows alphabetically and apparently doesn't take "reorder = FALSE" option or anything like it. Is there anything I
2003 Jul 17
3
univariate normal mixtures
Hello, I have a concrete statistical question: I have a sample of an univariate mixture of an unknown number (k) of normal distributions, each time with an unknown mean `m_i' and a standard deviation `k * m_i', where k is known factor constant for all the normal distributions. (The `i' is a subscript.) Is there a function in R that can estimate the number of normal distributions k
2017 May 30
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
....3 + 1L) )) groups <- lapply(list(groups), as.factor) # (gain a bit in tapply()) ## Step 2 ## sort *both* x & y "along x": x <- sort.int(x, index.return = TRUE) y <- y[x$ix] x <- x$x if(plot.) plot(x,y) ## Step 3 m_x <- tapply(x, groups, median) m_y <- tapply(y, groups, median) if(plot.) { points(m_x, m_y, cex=2, pch=3, col="red") segments(m_x[1],m_y[1], m_x[3],m_y[3], col="red") } ## Step 4 R <- if(n == 2) 2L else 3L slope <- (m_y[[R]] - m_y[[1]]) / (m_x[[R]] - m_x[[1]]) intercept <- m_y...
2012 May 29
0
mlogit package inquiry
Dear all, ? I am implementing a stochastic utility model that will eventually make use of multinomial logit. I found that there is a package in R called mlogit. I am not sure whether I have already found the correct package or software. May I ask am I correct? ? Basically, let's say ? I have observations of n outcomes, for each outcome 1<=i<=n, they were selected by a choice from a set
2006 May 08
2
On the speed of apply and alternatives?
Dear all, I have to handle a large matrix (1000 x 10001) where in the last column i have a value that all the preceding values in the same row has to be compared to. I have made the following code : # generate a (1000 x 10001) matrix, testm # generate statistics matrix 1000 x 4: qnt <- c(0.01, 0.05) cmp_fun <- function(x) { LAST <- length(x) smpls <- x[1:(LAST-1)] real
2012 May 23
1
numerical integration
Greetings, Sorry, the last message was sent by mistake! Here it is again: I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix
2003 Oct 21
2
Denominator Degrees of Freedom in lme() -- Adjusting and Understanding Them
Hello all. I was wondering if there is any way to adjust the denominator degrees of freedom in lme(). It seems to me that there is only one method that can be used. As has been pointed out previously on the list, the denominator degrees of freedom given by lme() do not match those given by SAS Proc Mixed or HLM5. Proc Mixed, for example, offers five different options for computing the
2017 May 29
3
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Here is an attached patch. Best, Serguei. Le 29/05/2017 ? 12:21, Serguei Sokol a ?crit : > The problem or actual R implementation relies on an assumption > that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6) > which reveals not to be true despite very trustful appearance. > > If we continue with the example of x=y=1:9 > then quantile(x, 1/6)=2.5 (here quantile()
2018 May 12
3
(no subject)
hello for exampl, i have this programme # Generating data which are right truncated library(DTDA) library(splines) library(survival) n<-25 X<-runif(n,0,1) V<-runif(n,0.75,1) for (i in 1:n){ while (X[i]>V[i]){ X[i]<-runif(1,0,1) V[i]<-runif(1,0.75,1) }} res<-lynden(X=X,U=NA, V=V, boot=TRUE) attach(res) temps = time M_i = n.event L_t = res
2012 May 23
0
numerical integrals
Greetings,   I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix $A_{i,j}$, $1\leq i,j\leq 5$, numerically and check against the known
2001 Oct 03
1
package GeneSOM ?
Hello Rprofessionals, The SOM-Obj works very well, when i normalize my data and the plot-function, too ! But i miss or didn't find the possibility , extract the information from the SOMplot "clusterSize" and "mean" for every cluster as quantitative information ( i.e. the DataFrame with an additional column which define the calculate clusters from SOM)? My intention -
2005 Sep 14
1
Random effect model
Dear R-help group, I would like to model directly following random effect model: Y_ik = M_ik + E_ik where M_ik ~ N(Mew_k,tau_k^2) E_ik ~ N(0,s_ik^2) i = number of study k = number of treatment --------------------------------------------------------------------------- I have practiced using the command from 'Mixed -Effects models in S and S-plus'
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails.
2004 Dec 03
3
Computing the minimal polynomial or, at least, its degree
Hi, I would like to know whether there exist algorithms to compute the coefficients or, at least, the degree of the minimal polynomial of a square matrix A (over the field of complex numbers)? I don't know whether this would require symbolic computation. If not, has any of the algorithms been implemented in R? Thanks very much, Ravi. P.S. Just for the sake of completeness, a
2018 May 13
0
(no subject)
> On May 12, 2018, at 9:42 AM, malika yassa via R-help <r-help at r-project.org> wrote: > > > hello > for exampl, i have this programme > # Generating data which are right truncated > library(DTDA) > library(splines) > library(survival) > n<-25 > X<-runif(n,0,1) > V<-runif(n,0.75,1) > for (i in 1:n){ > while (X[i]>V[i]){ >
2008 May 11
0
loess and locpoly
...ill(x, y, blockmax = 5, divisor = 20,trim = 0.01, proptrun = 0.05, gridsize = n, range(x), truncate = FALSE) m=locpoly(x, y, drv = 0, degree = 1, gridsize= n, bandwidth=bw, bwdisc = 25, range(x), binned = FALSE) fitfn <- approxfun(m$x, m$y) m_y <- fitfn(x) but i'm not sure it is right? Thanks in advanced. Pawel Teisseyre.
2018 May 10
0
(no subject)
We need some idea of the problem. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example http://adv-r.had.co.nz/Reproducibility.html On Thursday, May 10, 2018, 11:07:30 a.m. EDT, malika yassa via R-help <r-help at r-project.org> wrote: Hello Do You help me, i have the problem in the package DTDA for ?find the probability of truncation