similar to: set the lower bound of normal distribution to 0 ?

Displaying 20 results from an estimated 200 matches similar to: "set the lower bound of normal distribution to 0 ?"

2008 Mar 27
2
options in 'rnorm' to set the lower bound of normal distribution to 0 ?
Dear list, I have a dataset containing values obtained from two different instruments (x and y). I want to generate 5 samples from normal distribution for each instrument based on their means and standard deviations. The problem is values from both instruments are non-negative, so if using rnorm I would get some negative values. Is there any options to determine the lower bound of normal
2010 Feb 17
2
extract the data that match
Hi r-users,   I would like to extract the data that match.  Attached is my data: I'm interested in matchind the value in column 'intg' with value in column 'rand_no' > cbind(z=z,intg=dd,rand_no = rr)             z  intg rand_no    [1,]  0.00 0.000   0.001    [2,]  0.01 0.000   0.002    [3,]  0.02 0.000   0.002    [4,]  0.03 0.000   0.003    [5,]  0.04 0.000   0.003    [6,] 
2003 Jan 20
1
make check for R-1.6.2 on IBM AIX
Dear all, The 'make check' step fails for the pacakge mva on IBM AIX. The tail of the Rout log file looks like: > for(factors in 2:4) print(update(Harman23.FA, factors = factors)) Call: factanal(factors = factors, covmat = Harman23.cor) Uniquenesses: height arm.span forearm lower.leg weight 0.170 0.107 0.166
2010 Dec 21
2
please Help me on a repeated measures anova
I currently work on a draft of an aquatic bioassessment. The conditions tested are the following: ER river water T dechlorinated water control 0.5 + 0.5mg / L of malate T + 1 dechlorinated water control + 1g / L of malate T ED dechlorinated water control SED + ER + river water sediment SED ED + sediment + water dechlorinated. It is the result of AChE in muscle (fillet of fish). The production of
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2000 Dec 06
3
write.table
Good morning, suppose the following: m <- round(matrix(rnorm(16), ncol=4), 3) a <- rev(c(0.01, 0.025, 0.05, 0.1)) rownames(m) <- a colnames(m) <- c("0.25,0.75", "0.4,0.6", "0.1,0.9", "0.4,0.9") m 0.25,0.75 0.4,0.6 0.1,0.9 0.4,0.9 0.1 1.034 -0.119 -1.213 0.619 0.05 0.035 1.074 0.525 1.671 0.025 -1.687 0.960
2013 Feb 01
2
Nested loop and output help
Hello Everyone, My name is Thomas and I have been using R for one week. I recently found your site and have been able to search the archives of posts. This has given me some great information that has allowed me to craft an initial design to an inquiry I would like to make into the breakdown of McNemar's test. I have read an intro to R manual and the posting guides and hope I am not violating
2002 Jun 20
2
cat output To data.frame.rows ?
Hi, is there a possibilty to get my function output with "cat " as data.frame.rows with variables ? Var1---------------- 8 15 1 3 Var2---------------- 0.170 0.319 0.0213 0.0638 Var3---------------- 83.8 88.6 90 75 Var4---------------- 84.3 84.3 100 83.3 Var5---------------- 62.5 56 20 53.3 function(data.frame) { .... ....
2012 Jun 15
1
How do anova() and Anova(type="III") handle incomplete designs?
Hello all: I am confused about the output from a lm() model with an incomplete design/missing level. I have two categorical predictors and a continuous covariate (day) that I am using to model larval mass (l.mass): leaf.species has three levels - map, syc, and oak cond.time has two levels - 30 and 150. There are no response values for Map-150, so that entire, two-way, level is missing.
2010 Oct 03
2
How to programme R to randomly replace some X values with Outliers
Dear experts, I am a beginner of R. I'm looking for experts to guide me how to do programming in R in order to randomly replace 5 observations in X explanatory variable with outliers drawn from U(15,20) in sample size n=100. The replacement subject to y < 15. The ultimate goal of my study is to compare the std of y with and without the presence of outliers based on average of 1000
2009 Dec 09
1
Significant performance difference between split of a data.frame and split of vectors
I have the following code, which tests the split on a data.frame and the split on each column (as vector) separately. The runtimes are of 10 time difference. When m and k increase, the difference become even bigger. I'm wondering why the performance on data.frame is so bad. Is it a bug in R? Can it be improved? > system.time(split(as.data.frame(x),f)) user system elapsed 1.700
2010 Dec 28
3
Error in combined for() and if() code
Hello, I am trying to filter a data set like below so that the peaks in the Phase value are more obvious and can be identified by a peak finding function following the useful advise of Carl Witthoft. I have written the following for(i in length(data$Phase)){ newphase=if(abs(data$Phase[i+1]-data$Phase[i])>6){ data$Phase[i+1] }else{data$Phase[i] } } I get the following error which I have not
2017 Sep 04
1
Merge by Range in R
Hi,? I have two big data set.? data _1 :? > dim(data_1) [1] 15820 5 > head(data_1) ? ?Chromosome ?????Start????????End????????Feature GroupA_3 1: ? ? ? ????????chr1 521369 ?750000 ????chr1-0001 ? ?????0.170 2: ? ? ? ????????chr1 750001 ?800000 ????chr1-0002 ? ????-0.086 3: ? ? ? ????????chr1 800001 ?850000 ????chr1-0003 ? ?????0.006 4: ? ? ? ????????chr1 850001 ?900000 ????chr1-0004 ?
2010 Jul 21
2
Variance of the prediction in the linear regression model (Theory and programming)
Hi, folks, Here are the codes: ############## y=1:10 x=c(1:9,1) lin=lm(log(y)~x) ### log(y) is following Normal distribution x=5:14 prediction=predict(lin,newdata=x) ##prediction=predict(lin) ############### 1. The codes do not work, and give the error message: Error in eval(predvars, data, env) : numeric 'envir' arg not of length one. But if I use the code after the pound sign, it
2011 Mar 01
1
glht() used with coxph()
Hi, I am experimenting with using glht() from multcomp package together with coxph(), and glad to find that glht() can work on coph object, for example: > (fit<-coxph(Surv(stop, status>0)~treatment,bladder1)) coxph(formula = Surv(stop, status > 0) ~ treatment, data = bladder1) coef exp(coef) se(coef) z p treatmentpyridoxine -0.063 0.939 0.161
2009 Oct 05
1
interpreting glmer results
Hi all, I am trying to run a glm with mixed effects. My response variable is number of seedlings emerging; my fixed effects are the tree species and distance from the tree (in two classes - near and far).; my random effect is the individual tree itself (here called Plot). The command I've used is: mod <- glmer(number ~ Species + distance + offset(area) + (1|Plot), family = poisson)
2008 May 06
0
Model Based Bootstrap
Hello. Has anyone any idea how a function would look like of a model based bootstrap, when the underlying time series follows an ARIMA(1,1,1)-process? A pure AR-process is no problem, but what is, if the time series need to be differentiated of order one or above and the additional MA-part? Sample code for a series, which follows a pure AR-process: #Series y of 192 observations, which follows
2012 May 02
1
coxph reference hazard rate
Hi, In the following results I interpret exp(coef) as the factor that multiplies the base hazard rate if the corresponding variable is TRUE. For example, when the bucket is ks008 and fidelity <= 3, then the rate, compared to the base rate h_0(t), is h(t) = 0.200 h_0(t). My question is then, to what case does the base hazard rate correspond to? I would expect the reference to be the first
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2005 Aug 08
1
Help with "non-integer #successes in a binomial glm"
Hi, I had a logit regression, but don't really know how to handle the "Warning message: non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)" problem. I had the same logit regression without weights and it worked out without the warning, but I figured it makes more sense to add the weights. The weights sum up to one. Could anyone give me some hint? Thanks a lot!