Displaying 7 results from an estimated 7 matches for "fmean".
Did you mean:
mean
2009 Nov 16
2
Conditional statement
...a stochastic model in discrete time.
The problem is that the stochastic parameters should not be negative and sometimes they happen to be.
How can I conditionate it to when it draws a negative number, it transforms into zero in that time step?
Here is the function:
stochastic_prost <- function(Fmean, Fsd, Smean, Ssd, f, s, n, time, out=FALSE, plot=TRUE) {
nt <- rep(0, time)
nt[1] <- n
for(n in 2:time) {
nt[n] <- 0.5*rnorm(1, Fmean, Fsd)*rnorm(1, Smean, Ssd)*exp(1)^(-(f+s)*nt[n-1])*nt[n-1]}
if(out==TRUE) {print(data.frame(nt))}
if(plot==TRUE) {plot(1:time, nt, type='l', main=...
2006 Feb 08
1
Simple optim - question
Hello,
I want to find the parameters mu and sigma that minimize the following
function.
It's important, that mu and sigma are strictly positive.
-----------------
optimiere = function(fmean,smean,d,x,mu,sigma)
{
merk = c()
for (i in 1:length(d))
merk=c(merk,1/(d[i]^2)*(d[i]-1/(fmean*(1-plnorm(x[i],mu,sigma))))^2)
return(sum(merk))
}
-----------------
To do that I'm using the nlm function, but I only get results for ONE of the
two parameters.
I cannot cope with optimizing the tw...
2011 Dec 15
1
How to open files that contain "0"
...=0?
These are valid values for the parameters I need to evaluate.
I have tried CSV and tab formats.
Trying XL Connect and/or XLConnectJars dies not seem to work to open
Excel files so I am at a loss on how to get the data into a DF.
Sample of data with 0 values:
Filename Dur TBC Fmax Fmin Fmean Fc S1 Sc Pmc
g8221843.13# 5.06 0 38.93 36.2 37.96 36.45 -34.08 192.69 6.8
g8221843.13# 0.41 5.29 38.83 36.04 38.83 38.83 -261.93 -513.05 0
g8221843.13# 0.66 0.68 35.71 33.4 36.42 35.63 -238.04 -392.06 0.2
g8221843.13# 0.58 54.84 42.78 40.3 41.1 40.3 410 0 6.2...
2009 Apr 25
5
Out of memory issue
Hi all,
I am trying to run some plots on data, but when loading he CSV data
file R is stopping and I am getting an out of memory error.
Anyway to tweak this somehow to get it to run?
Using WinXP with 4 GB RAM
Tnx
Bruce
2018 Apr 17
2
iterative read - write
...armonic H3
frequencies
*
*#based on Fc that is generally loudest at the 2^nd harmonic.*
*BW<-within(BW,FcH1<-Fc*.5)*
*BW<-within(BW,FcH3<-FcH1*3)*
*#rename to a DF to calculate the stats
*
*BatStats<-BW*
*BatStats<-Deducer::descriptive.table (vars = d
(Dur,TBC,Fmin,Fmax,BW,Fmean,Fk,FcH1,Fc,FcH3,Sc,Pmc),data=
BatStats,func.names =c("Valid N","Minimum","Maximum","Mean","St.
Deviation"),func.additional= list(p10=function(x) quantile(x, c(0.10),
na.rm=TRUE),p25=function(x) quantile(x, c(0.25),
na.rm=TRUE),p75=function(x) qu...
2008 Apr 22
2
bootstrap for confidence intervals of the mean
d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L,
NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L)
boot.out <-boot(d, mean, R=1000, sim="permutation")
Error in mean.default(data, original, ...) :
'trim' must be numeric of length one
I know that I am missing something but I can't figure it out.
thanks
stephen
--
Let's not spend our
2009 Apr 26
6
Memory issues in R
...can run smaller sample data sets w/o problems and everything plots as
needed.
However I need to review large data sets.
Using latest R version 2.9.0 (2009-04-17)
My data is in CSV format with a header row and is a big data set with
1,200,240 rows!
E.g. below:
Dur,TBC,Fmax,Fmin,Fmean,Fc,S1,Sc,
9.81,0,28.78,24.54,26.49,25.81,48.84,14.78,
4.79,1838.47,37.21,29.41,31.76,29.52,241.77,62.83,
4.21,5.42,28.99,26.23,27.53,27.4,76.03,11.44,
10.69,193.48,30.53,25.4,27.69,25.4,-208.19,26.05,
15.5,248.18,30.77,24.32,26.57,24.92,-202.76,18.64,
14.85,217.47,31.25,24.62,26.9...