Displaying 11 results from an estimated 11 matches for "randn".
Did you mean:
rand
2006 Jul 14
3
Generating random normal distribution with mean 0 and standard deviation 1
Hello,
This must be really simple, but I can't find it on R Site search. I need to
generate a random normally distributed series with mean 0 and sd 1. In
Matlab, this code is randn(n).
The closest I found is runif(20,-1,1) but this forces a maximum and a
minimum, and there's no way to specify a standard deviation of 1.
>sd(runif(20,-1,1))
[1] 0.578164
2016 Apr 27
3
Create a new variable and concatenation inside a "for" loop
Hello,
Suppose the you need a loop to create a new variable , i.e., you are not reading data from outside the loop. This is a simple example in Matlab code,
for i=1:5
r1=randn
r2=randn
r=[r1 r2]
c(i,:)=r; % creation of each row of c , % the ":" symbol indicates all columns. In R this would be [i,]
end
The output of interest is c which I'm creating inside the "for" loop -also the index used in the loop is used to create c. In R I had to create c...
2016 Apr 27
3
Create a new variable and concatenation inside a "for" loop
..., Fabiana" <fabiana.gordon at imperial.ac.uk> wrote:
>>Hello,
>>
>>Suppose the you need a loop to create a new variable , i.e., you are
>>not reading data from outside the loop. This is a simple example in
>>Matlab code,
>>
>>for i=1:5
>>r1=randn
>>r2=randn
>>r=[r1 r2]
>>c(i,:)=r; % creation of each row of c , % the ":" symbol indicates
>>all columns. In R this would be [i,]
>>end
>>
>>The output of interest is c which I'm creating inside the "for" loop
>>-also the in...
2016 Apr 27
0
Create a new variable and concatenation inside a "for" loop
...25:14 PM GMT+01:00, "Gordon, Fabiana" <fabiana.gordon at imperial.ac.uk> wrote:
>Hello,
>
>Suppose the you need a loop to create a new variable , i.e., you are
>not reading data from outside the loop. This is a simple example in
>Matlab code,
>
>for i=1:5
>r1=randn
>r2=randn
>r=[r1 r2]
>c(i,:)=r; % creation of each row of c , % the ":" symbol indicates
>all columns. In R this would be [i,]
>end
>
>The output of interest is c which I'm creating inside the "for" loop
>-also the index used in the loop is used to...
2016 Apr 28
0
Create a new variable and concatenation inside a "for" loop
...Fabiana" <fabiana.gordon at imperial.ac.uk> wrote:
>>Hello,
>>
>>Suppose the you need a loop to create a new variable , i.e., you are
>>not reading data from outside the loop. This is a simple example in
>>Matlab code,
>>
>>for i=1:5
>>r1=randn
>>r2=randn
>>r=[r1 r2]
>>c(i,:)=r; % creation of each row of c , % the ":" symbol indicates
>>all columns. In R this would be [i,]
>>end
>>
>>The output of interest is c which I'm creating inside the "for" loop
>>-also the i...
2008 Dec 09
1
Data Analysis Functions in R
Hi experts of R,
Are there any functions in R to test a univariate series for long memory
effects, structural breaks and time reversability?
I've found for ARCH effects(ArchTest), for normal (Shapiro.test,
KS.test(comparing with randn) and lillie.test) but not for the above
mentioned.
Where can I find a comprehensive list of functions available by type?
Thank you
Renato Costa
--
View this message in context: http://www.nabble.com/Data-Analysis-Functions-in-R-tp20909079p20909079.html
Sent from the R help mailing list archive a...
2007 Nov 21
1
equivalent of Matlab robustfit?
...estimates the variance-covariance matrix of the
coefficient estimates as V=inv(X'*X)*STATS.S^2. The standard errors
and correlations are derived from V.
ROBUSTFIT treats NaNs in X or Y as missing values, and removes them.
Example:
x = (1:10)';
y = 10 - 2*x + randn(10,1); y(10) = 0;
bls = regress(y,[ones(10,1) x])
brob = robustfit(x,y)
scatter(x,y)
hold on
plot(x,brob(1)+brob(2)*x,'r-', x,bls(1)+bls(2)*x,'m:')
See also REGRESS, ROBUSTDEMO.
2003 Feb 06
6
Confused by SVD and Eigenvector Decomposition in PCA
Hey, All
In principal component analysis (PCA), we want to know how many percentage
the first principal component explain the total variances among the data.
Assume the data matrix X is zero-meaned, and
I used the following procedures:
C = covriance(X) %% calculate the covariance matrix;
[EVector,EValues]=eig(C) %%
L = diag(EValues) %%L is a column vector with eigenvalues as the elements
percent
2001 Nov 12
2
Announcement: Automatic ATLAS support under Debian GNU/Linux
...ly relevant for systems which have not yet
upgraded to libc6_2.2.4-5 or later.
II.B Old behaviour requiring LD_LIBRARY_PATH for Octave
For Octave, use the variable LD_LIBRARY_PATH. On a computer with the
atlas2-base package:
$ LD_LIBRARY_PATH=/usr/lib/atlas octave2.1 -q
octave2.1:1> X=randn(1000,1000);t=cputime();Y=X'*X;cputime-t
ans = 7.9600
$ edd at homebud:~> octave2.1 -q
octave2.1:1> X=randn(1000,1000);t=cputime();Y=X'*X;cputime-t
ans = 61.520
For R version 1.3.0-4, the R_LD_LIBRARY_PATH variable has to be used, and its
value needs to be copied out...
2008 Dec 23
1
Approximate Entropy?
Dear guRus,
is there a package that calculates the Approximate Entropy (ApEn) of a
time series?
RSiteSearch only gave me a similar question in 2004, which appears not
to have been answered:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/28830.html
RSeek.org didn't yield any results at all.
Happy holidays (where appropriate),
Stephan
2019 Jan 16
2
optimizacion costos
Estimado Jesús Para Fernández
En teoría es ese material, lo vi muy rápido y en la parte genética tiene
cosas que biológicamente no son así, hay un libro de Falconer, Introducción
a la genética cuantitativa, que tiene escrita la parte matemática, hay un
abismo entre la biología y los ingenieros que se inspiran en la biología.
Yo pensaba en la resolución de un problema real, aunque relativamente