similar to: How to simulate a variable Xt=Wit+0.5Wit-1 with

Displaying 20 results from an estimated 200 matches similar to: "How to simulate a variable Xt=Wit+0.5Wit-1 with"

2011 Jan 17
0
(no subject)
Dear R community,and especially Giovanni Millo, For my master's thesis i need to simulate a panel data with the fixed effects correlated with the predicor, so i run the the following code: set.seed(1970) #######################Panel data simulation with alphai correlated with xi##################################### n <- 5 t <- 4 nt <- n*t pData <- data.frame(id =
2011 Jan 17
0
PANEL DATA SIMULATION(sorry for my previous email with no subject)
Dear R community,and especially Giovanni Millo, For my master's thesis i need to simulate a panel data with the fixed effects correlated with the predicor, so i run the the following code: set.seed(1970) #######################Panel data simulation with alphai correlated with xi##################################### n <- 5 t <- 4 nt <- n*t pData <- data.frame(id =
2011 Jan 18
0
Need help in a simulation study
Dear R community,and especially Giovanni Millo, For my master's thesis i need to simulate a panel data with the fixed effects correlated with the predicor, so i run the the following code: set.seed(1970) #######################Panel data simulation with alphai correlated with xi##################################### n <- 5 t <- 4 nt <- n*t pData <- data.frame(id =
2011 Jan 17
0
PANEL DATA SIMULATION
Dear R community,and especially Giovanni Millo, For my master's thesis i need to simulate a panel data with the fixed effects correlated with the predicor, so i run the the following code: set.seed(1970) #######################Panel data simulation with alphai correlated with xi##################################### n <- 5 t <- 4 nt <- n*t pData <- data.frame(id =
2011 Dec 08
1
optimize()
Hi! I have a difficulty in the use of function optimize(). Could you help me? I want to maximize this function: ##### Logaritmo da distribui??o condicional de alpha[i] lp_alphai <- function(alphai, i, beta, tau, N){ t1 <- (N[i+1] - N[i])*log(alphai) t2 <- - (N[i+1] - N[i])*alphai*log(beta[i]) t3 <- (alphai - 1)*sum(log(times[(N[i] + 1):N[i+1]])) t4 <- -
2011 Feb 09
2
Generate multivariate normal data with a random correlation matrix
Hi All. I'd like to generate a sample of n observations from a k dimensional multivariate normal distribution with a random correlation matrix. My solution: The lower (or upper) triangle of the correlation matrix has n.tri=(d/2)(d+1)-d entries. Take a uniform sample of n.tri possible correlations (runi(n.tr,-.99,.99) Populate a triangle of the matrix with the sampled correlations Mirror the
2002 Jan 15
1
acf conf intervals +speed
Hi, I'm trying to obtain confidence intervals for auto and cross correlation estimates. I've adapted code made available by Stock and Watson that uses the Bartlett Kernel and the delta method. In R it runs really, really slow because of the loops it uses and I have 9 series that I'd like to examine (81 total combinations). It was easy enough to replace one of the while loops with a
2010 Dec 02
2
Hmisc label function applied to data frame
Hello, I'm attempting to create a data frame with correlations between every pair of variables in a data frame, so that I can then sort by the value of the correlation coefficient and see which pairs of variables are most strongly correlated. The sm2vec function in the corpcor library works very nicely as shown here: library(Hmisc) library(corpcor) # Create example data x1 = runif(50) x2 =
2009 May 15
2
Using column length in plot gives error
Hi I'm trying to write a generic script for processing some data which finishes off with some plots. Given Im never sure how many columns will be in my dataframe I wanted to using the following plot(spectra.wavelength, cormat, type = "l", ylim=c(-1,1), xlab="Wavelength (nm)", ylab="Correlation") however even if I specify as type="l" it appears plot
2013 Feb 20
1
Problem with levelplot() in a loop
Dear R users, I am trying to print heatmaps in a loop (with a pause). Idea is to visualize changing correlations over time and for testing I wrote this simple (reproducible) code below. My problem is that levelplot() does not produce any output when I run the code (though heatmap does). Ideally I would like to use levelplot() as it produces a neat index on the side indicating the color and the
2008 May 17
1
Correlated Columns in data frame
Dear all, Sorry to post my query once again in the list, since I did not get attention from anyone in my previous mail to this list. Now I make it simple here that please give me a code for find out the columns of a dataframe whose correlation coefficient is below a pre-determined threshold. (For detailed query please see my previous message to this list, pasted hereunder) Thanks and regards,
2013 Feb 02
1
Why replacement has length zero? And How can I fix it?
Hi for the loop section runif needs curved brackets Try IAP <-NA for (i in 1:Sample.Size){ if (DataSet$SES[i]>0) { IAP[i] <- ifelse(runif(1)>0.75, 1, 0) # High SES, higher chance to be in Treatment # } else { IAP[i] <- ifelse(runif(1)<=0.25, 1, 0) # Low SES, lower chance to be in Treatment # } } # End loop # IAP IAP zjiaqi19880219 wrote > Hi,
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does anyone have a clever way to simulate a correlation matrix such that each column contains dichotomous variables (0,1) and where each column has different prevalence rates. For instance, I would like to simulate the following correlation matrix: > CORMAT[1:4,1:4] PUREPT PTCUT2 PHQCUT2T ALCCUTT2 PUREPT 1.0000000 0.5141552 0.1913139 0.1917923 PTCUT2
2008 Aug 06
1
Correlation dichotomous factor, continous (numerical) and ordered factor
Hello R-User! I appologise in advance if this should also go into statistics but I am presently puzzled. I have a data.frame (about 300 rows and about 80 variables) and my variables are dichotomous factors, continuous (numerical) and ordered factors. I would like to calculate the linear correlation between every pair of my variables, because I would like to perform a logistic regression (glm())
2004 Apr 21
0
R2HTML update
Hi to all R users, I have just uploaded in CRAN R2HTML 1.3, latest update of the R2HTML package, so that it should soon be available for your favorite platform. CHANGELOG: - Fixed some user-contributed bugs. - More CSS styles are defined, so that it's possible to change the whole look-and-feel of outputs / Add some CSS sample files. - Added HTMLstem to produce a stem-and-leaf plot (as
2004 Apr 21
0
R2HTML update
Hi to all R users, I have just uploaded in CRAN R2HTML 1.3, latest update of the R2HTML package, so that it should soon be available for your favorite platform. CHANGELOG: - Fixed some user-contributed bugs. - More CSS styles are defined, so that it's possible to change the whole look-and-feel of outputs / Add some CSS sample files. - Added HTMLstem to produce a stem-and-leaf plot (as
2007 Jul 24
0
Fitting the best line to the plot of distance vs. correlation matrix
Hi all, Thanks for your help in generating the matrix of distance vs correlation. I did it using plot(as.vector(as.matrix(cormat)), as.vector(as.matrix(distmat))) Now I want to quantitate the same. May be on linear regression or some other statistical functions. I have tried using linmod for linear regression. But as I have two matrices in the form of the dataframes, I'm wondering if it
2004 Oct 17
2
Errors while compiling packages with namespace?
Hello, I try to set up namespaces for packages. It is fine for several of them, except one whose compilation fails (under Windows XP & R 2.0.0): ---------- Making package svViews ------------ adding build stamp to DESCRIPTION installing NAMESPACE file and metadata Error in parse(file, n, text, prompt) : syntax error on line 21 Execution halted make[2]: *** [nmspace] Error 1 make[1]: ***
2006 Mar 25
0
apic vs xt-pic on fc3?
Currently running fc3 (2.6.9-1.667) on a test box with a TDM04b and A200D installed with svn trunk. Its working well except one of the cards is sharing interrupts with another device that I'd like to clean up. I'd like to try moving to io-apic interrupt support for more interrupts. The MB bios is config'ed to support apic, but apparently the kernel is not. Is there a kernel level
2012 Aug 07
0
ATI X1800 XT driver for CentOS 5
Does anyone have direct experience of setting up an ATI X1800 XT under CentOS 5? I have seen horror stories on the web about buggy drivers. What is the best source (and version) for drivers? Any advice would be much appreciated. -- Dick Holland