similar to: cross product

Displaying 20 results from an estimated 3000 matches similar to: "cross product"

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?
2011 Jan 20
2
auc function
Hi, there. Suppose I already have sensitivities and specificities. What is the quick R-function to calculate AUC for the ROC plot? There seem to be many R functions to calculate AUC. Thanks. Yulei [[alternative HTML version deleted]]
2005 Jun 15
2
need help on computing double summation
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. > 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
2010 Jul 13
6
create variables with indexes
Hi, there: Suppose I want create variables with indexes in their names, e.g., X_1_1, X_1_2, X_1_3, ..., X_1_10, X_2_1, X_2_2, X_2_3, .. X_2_10,..., X_10_1, X_10_2, ... X_10_10. It looks like I need to use 2 indexes I and J so I is looped from 1 to 10, and J is looped from 1 to 10. But I don't know how to automatically produce X with these combination of indexes. Should I use paste function?
2004 Sep 13
1
maximization subject to constaint
Hello: I have been trying to program the following maximization problem and would definitely welcome some help. the target function: sum_{i} f(alpha, beta'X_{i}), where alpha and beta are unknown d-dim parameter, f is a known function an X_{i} are i.i.d. r.v. I need to maximize the above sum, under the constaint that:
2006 Feb 13
2
bivariate normal distribution
Hi, there. Does anyone know the R function for calculating the cdf of bivariate normal distribution function? Thanks. Yulei [[alternative HTML version deleted]]
2008 Mar 06
2
calculate AUC and plot ROC in R
Hi, there: Could someone tell me a simple function of plot ROC curve and calculate AUC in R? My setting is very simple, a column of the true binary response and another column of predicted probabilities. Thanks! Yulei [[alternative HTML version deleted]]
2012 Aug 16
1
sum predictions by hand
Hi, If I do a standard svm regression with e1071 x <- seq(0.1, 5, by = 0.05) y <- log(x) + rnorm(x, sd = 0.2) m <- svm(x, y) we can do predict(m,x) to get the fitted values. But what if I wan tho get them by hand? Seem to me like it should be w = t(m$coefs)%*%m$SV x.scaled = scale(x, m$x.scale[[1]], m$x.scale[[2]]) t(w %*% t(as.matrix(x.scaled))) - m$rho but this is wrong If i
2008 Jun 11
1
specifying ranges in scatter plot
Hi, there: Does anyone know how to specify the ranges in the axises when I make scatter plots using pairs()? In the general plot function, I can use xlim and ylim option. But how can I do this if I use pairs()? Thanks. Yulei [[alternative HTML version deleted]]
2009 Apr 27
1
plot estimates and their 95% confidence intervals
Hi, there: I have a dataset with 50 states and for each state, I have its associated mean estimate (for some parameters) and the lower and upper bound of the 95% CI. The data look like below: state ami_mean ami_low ami_up 1 MS -0.58630 -0.90720 -0.29580 2 KY -0.48100 -0.75990 -0.19470 3 FL -0.47900 -0.62930 -0.32130 I would like to have a plot the 95% CI (characterized by
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all I recently started to write a matrix exponentiation operator for R (by adding a new operator definition to names.c, and adding the following code to arrays.c). It is not finished yet, but I would like to solicit some comments, as there are a few areas of R's internals that I am still feeling my way around. Firstly: 1) Would there be interest in adding a new operator %^% that performs
2007 Jul 06
1
algebra/moving average question - NOTHING TO DO WITH R
This has ABSOLUTELY nothing to do with R but I was hoping that someone might know because there are obviously a lot of very bright people on this list. Suppose I had a time series of data and at each point in time t, I was calculating x bar + plus minus sigma where x bar was based on a moving window of size n and so was sigma. So, if I was at time t , then x bar t plus minus sigma_t would be
2001 Jan 02
0
mdct explanation
...as promised. This describes the mdct used in my d.m.l patch. I think it is the same as the Lee fast-dct. I typed it in a kind of pseudo-TeX, 'cause the ascii art would kill me. Hope you can read TeX source; if not, ask someone who can to make a .ps/.gif/.whatever of the TeX output, and put it on a webpage or something. I'm to lazy to do it (and besides, I don't have access to TeX,
2005 Sep 26
2
questions about boxplots
Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? 2. How can I put two boxplots in one x-y axis? Thanks. Yulei $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Yulei He 276 Grove St. Apt 3 Newton, MA 02466 617-796-7834(H)
2003 Oct 27
4
how to set missing values in R
Hi, there. Can I ask how to set up missing values in R? Suppose I want to assign the missing value to the elements in vector which is greater than zero like this: x<-c(1,3,-1,0,4); after the missing value assignment, x becomes (NA,NA,-1,0,NA). Thanks! Yulei $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Yulei He 1586 Murfin Ave. Apt 37 Ann Arbor, MI 48105-3135 yuleih at umich.edu
2005 Jan 13
2
multivariate diagnostics
Hi, there. I have two questions about the diagnostics in multivarite statistics. 1. Is there any diagnostics tool to check if a multivariate sample is from multivariate normal distribution? If there is one, is there any function doing it in R? 2. Is there any function of testing if two multivariate distribution are same, i.e. the multivariate extension of Kolomogrov-Smirnov test? Thanks for
2011 Mar 14
1
Math characters in column heading using latex() in Hmisc
Hi Everybody I want to print a latex table containing math characters in the column heading These are the formulae I want to use as column headings. It prints OK from TeX $\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$, $XU_{alt,y}$, $n$, $\bar{C}_{P,y}$ My plan was to create a character vector with these and later rbind the values to them. When I create the vector like:
2000 Apr 04
0
stochastic process transition probabilities estimation
Hi all, I'm new with R (and S), and relatively new to statistics (I'm a computer scientist), so I ask sorry in advance if my question is silly. My problem is this: I have a (sample of a) discrete time stochastic process {X_t} and I want to estimate Pr{ X_t | X_{t-l_1}, X_{t-l_2}, ..., X_{t-l_k} } where l_1, l_2, ..., l_k are some fixed time lags. It will be enough for me to compute