search for: m_j

Displaying 7 results from an estimated 7 matches for "m_j".

Did you mean: m_
2012 Feb 17
2
(subscript) logical subscript too long in using apply
...(data), byrow=TRUE) T1<- c(rep(NA,ncol(data))) T0<- c(rep(NA,ncol(data))) cov_rank<-matrix(c(rep(NA,ncol(data)*ncol(data))), nrow = ncol(data), ncol = ncol(data) , byrow=TRUE) med <- c(rep(NA,ncol(data))) mean_ge <- c(rep(NA,ncol(data))) n<-c(NA,2) if (ncol(data)>1){ for(m_j in 1:ncol(data)){ med[m_j]<-median(data[,m_j])} for(m_j in 1:ncol(data)) for(m_i in 1:nrow(data)) { if(data[m_i,m_j]>med[m_j]) med_ge[m_i,m_j]=0 else med_ge[m_i,m_j]=1 } y=c(1,1,1,1,1,1,0,0,0,0) n<-c(sum(y == 1),s...
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 $A_{i,j}$, $1\leq i,j\leq 5$, numerically and check against the known an...
2023 May 12
2
Newbie: Controlling legends in graphs
...-04-16 NA 186 # ? 1,236 more rows # ? Use `print(n = ...)` to see more rows > Here's my attempts. You can see some of the things I've tried in the commented out sections: weights %>% group_by(year(Date)) %>% summarize( m_K = mean(K, na.rm = TRUE), m_J = mean(J, na.rm = TRUE), ) %>% ggplot(aes(x = `year(Date)`)) + geom_point(aes(y = m_K, color = "red")) + geom_smooth(aes(y = m_K, color = "red")) + geom_point(aes(y = m_J, color = "blue")) + geom_smooth(aes(y = m_J, color = "bl...
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 an...
2012 Mar 20
1
How to write and analyze data with 3 dimensions
Suppose I have data organized in the following way: (P_i, M_j, S_k) where i, j and k and indexes for sets. I would like to analyze the data to get for example the following information: what is the average over k for (P_i, M_j) or what is the average over j and k for P_i. My question is what would be the way of doing this in R. Specifically how should I wri...
2023 May 16
0
Newbie: Controlling legends in graphs
...> ? > >> >> Here's my attempts. You can see some of the things I've tried in the >> commented out sections: >> weights %>% >> ????? group_by(year(Date)) %>% >> ????? summarize( >> ????????? m_K = mean(K, na.rm = TRUE), >> ????????? m_J = mean(J, na.rm = TRUE), >> ????????? ) %>% >> ????? ggplot(aes(x = `year(Date)`)) + >> ????? geom_point(aes(y = m_K, color = "red")) + >> ????? geom_smooth(aes(y = m_K, color = "red")) + >> ????? geom_point(aes(y = m_J, color = "blue")...
2023 May 16
0
[External Email] Newbie: Controlling legends in graphs
...is part of > the problem: > > ..... > ? ? ?geom_point(aes(y = m_K, color = "red")) +? ##### >> you've > associated "K" with the color red > ? ? ?geom_smooth(aes(y = m_K, color = "red")) + > ? ? ?geom_point(aes(y = m_J, color = "blue")) +? ?###### >> and "J" > with the color blue > ? ? ?geom_smooth(aes(y = m_J, color = "blue")) + > > ..... > Yes, I was confused that I associated "K" with the color red, yet the line and points for K's da...