search for: mns

Displaying 20 results from an estimated 49 matches for "mns".

Did you mean: fns
2003 Sep 07
3
bug in crossprod? (PR#4092)
...directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### # The last line of following code produces a segmentation fault: x <- 1:10 f <- gl(5,2) mns <- tapply(x,f,mean) crossprod(mns) #to get sum of squares of mns. # Of course sum(mns^2) is more straightforward. --please do not edit the information below-- Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu system = i686, linux-gnu status = major = 1 minor = 7.1 year...
2012 Feb 13
2
Error in apply(x2, 1, diff) : dim(X) must have a positive length
Anyone knows hat might be the cause of this error? Thanks for any help! >library(MASS) > dif.mns = function(x2,tr1=.2,tr2=.3){ + #generates four different 'means' using + #difference scores from x2, an n x 2 matrix + #for use w/ bootstrap comparisons + diffs = apply(x2,1,diff) + mn1=mean(diffs) + mn2=mean(diffs,tr=.2) + mn3=mean(diffs,tr=.3) + mn4=median(dif...
2009 Apr 20
2
plotCI (plotrix) problem
...ervals "stretched" in the x-direction using plotCI() in the plotrix package. The same data provides an appropriate set of intervals when "stretched" in the y-direction but I only get a lower interval when "stretched" in the x-direction. The data are as follows mns <- c(-0.00584,-0.00458,-0.00934,-0.00969,-0.01007,0.01146,-0.00261,-0.00287 ,0.00035,-0.00248,0.00084,0.01183,-0.00617,-0.00789,-0.00405,-0.01076,0. 00285,0.01464,0.01665,0.00179,-0.00038,-0.00046,0.00388,0.00501,0.00237, -0.00488,-0.00081,-0.00432,-0.00172,0.00574,0.00853,0.00869,-0.00551,-0. 0...
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all, Very surprising (to me!) and mystifying result from predict.glm(): the predictions vary depending on whether or not I use ns() or splines::ns(). Reprex follows: library(splines) set.seed(12345) dat <- data.frame(claim = rbinom(1000, 1, 0.5)) mns <- c(3.4, 3.6) sds <- c(0.24, 0.35) dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd = sds[dat$claim + 1])) dat <- dat[order(dat$wind), ] m1 <- glm(claim ~ ns(wind, df = 5), data = dat, family = binomial) m2 <- glm(claim ~ splines::ns(wind, df = 5), data = dat, fami...
2011 Feb 09
1
add mean and sd to dotplot in each panel using lattice
Hi, I have a data frame like this: ScoreDoseSex 2.81Dose1M 1.81Dose1M 1.22Dose1M 0.81Dose1M 0.49Dose1M 0.22Dose1M 0.00Dose1M -0.19Dose1M -0.17Dose1F -0.32Dose1F -0.46Dose1F -0.58Dose1F -0.70Dose1F -0.81Dose1F -0.91Dose1F -1.00Dose1F -1.77Dose2M -1.85Dose2M -1.93Dose2M -2.00Dose2M -2.07Dose2M -2.14Dose2M -2.20Dose2M -2.26Dose2M -2.32Dose2F -2.38Dose2F -2.17Dose2F -2.49Dose2F -2.54Dose2F
2008 Dec 19
2
error bars
Dear Help I'm new to R (from matlab)...using windows XP. I've tried to work out, to no avail, 4 things: 1) rotating the numbers on axes...something to do with par(str) ?? 2) how to close a window having opened one e.g. windows(7,7) 3) how to manipulate the key (e.g. dots, lines etc) on the legend. Using pch just gives me the same key for all functions on a plot. i.e. legend
2002 Mar 05
3
newbie: remove column with low mean from a matrix
Dear all, Sorry to bother you with one more newbie question. I have a dataobject with several hundreds of columns. I want to remove columns with a mean of the column values below a certain value: > a<- c(1,2,3,4,5,6) > b<-c(2,4,6,8,10,12) > c<- c(3,6,9,12,15,18) > test<- as.matrix(cbind(a, b, c)) > mean(a) [1] 3.5 > mean(b) [1] 7 > mean(c) [1] 10.5 Say the "certain value...
2008 Jan 30
4
Loop with variable index
I have a list of 20 values. The first time through a loop I want to find the mean and stnd.dev. of the first two values; the second time through the loop I want to find the mean and stnd. dev. of the first 3 values, etc. until the last time through the loop I want to find the mean and stnd. dev. of all 20 values, so I end up with 19 means and stnd. deviations. How would I construct such a loop?
2010 Jan 29
2
Vectors with equal sd but different slope
Hi, what I would need are 2 vector pairs (x,y) and (x1,y1). x and x1 must have the same sd. y and y1 should also exhibit the same sd's but different ones as x and x1. Plotting x,y and x1,y1 should produce a plot with 2 vectors having a different slope. Plotting both vector pairs in one plot with fixed axes should reveal the different slope. many thanks syrvn -- View this message in
2012 Mar 30
4
Trying to understand factors
I'm trying to figure out about factors, however the on-line documentation is rather sparse. I guess, factors are intended for grouping arrays members into categories, which R names "Levels". And so we have: * state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
2005 Oct 18
3
CAPI - displaying individual MSN
...I configure this? With the above configuration the display always shows 8304490. I've tried to change the number in the dialplan, but this doesn't change anything: exten => _90[23456789].,1,SetCIDNum(83044912) exten => _90[23456789].,2,Dial(Capi/g1/${EXTEN:1},30,tr) If I remove the mns line in the capi.conf or set msn=* or msn=830449* Asterisk isn't able to open the CAPI channel. Does anyone have a hint for me? If yes - THANK YOU ;-) Stefan
2010 Aug 30
2
while loop until end of file
Hi Guys, stumped by a simple problem. I would like to take a file of the form Pair group param1 1 D 10 1 D 10 1 R 10 1 D 10 2 D 10 2 D 10 2 D 10 2 R 10 2 R 10 etc.. and for each pair, calculate the average of
2018 Apr 27
0
predict.glm returns different results for the same model
...l, > > Very surprising (to me!) and mystifying result from predict.glm(): the > predictions vary depending on whether or not I use ns() or > splines::ns(). Reprex follows: > > library(splines) > > set.seed(12345) > dat <- data.frame(claim = rbinom(1000, 1, 0.5)) > mns <- c(3.4, 3.6) > sds <- c(0.24, 0.35) > dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd = > sds[dat$claim + 1])) > dat <- dat[order(dat$wind), ] > > m1 <- glm(claim ~ ns(wind, df = 5), data = dat, family = binomial) > m2 <- glm(claim ~ splines:...
2010 Apr 08
1
Placing the ≥ symbol in the Trellis custom strip
Hello, I am trying to use ≥ symbol in the Trellis custom strip. The ascii ALT Key for this symbol is 242. However, when I try "\242 90 kg" I get the ¢ symbol in the trellis custom strip. Can some one kindly help me? Thanking you in advance, MNS [[alternative HTML version deleted]]
2010 Mar 17
2
How to use "ifelse" to generate random value from a distribution
I need use different parameters of distribution for different case to generate random value, but I use ifelse, the generated value is fixed without change. Here is example data1 y x 1 1 2 2 2 1 3 3 2 4 4 3 5 5 3 6 6 1 7 7 2 8 8 1 9 9 1 10 10 3 11 11 3 12 12 2 ifelse(data1$x==1,rnorm(1,2,1),ifelse(data1$x==2,rnorm(1,-2,1),rnorm(1,110,1))) [1] -1.8042172 0.8478681
2010 Jan 06
1
boxplot help
Dear Rexperts, I am trying to add a '+' identifying the mean in a boxplot using the following sizelist <- split(size, grp) centers <- boxplot(sizelist, style.bxp = "att", medpch = "o", ylab = "Prostate Volume (cm3)") points(centers, unlist(lapply(sizelist, mean)), pch = "+") But, I get error Error in xy.coords(x, y) :
2008 Jun 05
1
Graphing help revisited
Sorry, my last post came out unreadable. I'll try again. Here is the data. Think of them as transposed columns. A: 1,1,1,2,3,4,5,6,6, 7B: 5,5,6,7,7,7,8,9,10,11 Split the data into two groups, each of size 5, and make a scatterplot. Bill<-read.table('something here') attach(Bill)Bill.s<-split(Bill, rep(1:2, each=5))plot(A,B,col='black') Group 1:A:1,1,1,2,3B:5,5,6,7,7Group 2:A:4,5,6,6...
2010 Jul 16
1
Toggle between the various pages for multi-page figures
..."Time (week)",ylb="Concentration (ng/mL)", scales = list( x = list(at=seq(0,3360,by=336) , labels=seq(0,20,by=2 )), y = list(at=log(c(.3,1,3,7.5,20,50,150)), labels=c(.3,1,3,7.5,20,50,150)) )) Please help, MNS [[alternative HTML version deleted]]
2011 Aug 18
1
Using mixed models to analyze Longitudinal intervention
...ber (Intercept) 508.757 22.5556 Residual 333.710 18.2677 Number of obs: 494, groups: Study.Number, 140 Fixed effects: Estimate Std. Error t value (Intercept) 162.3291 4.4392 36.57 group.minus.1 3.4466 5.4699 0.63 Visit -1.4515 0.5997 -2.42 Correlation of Fixed Effects: (Intr) grp..1 group.mns.1 -0.593 Visit -0.493 -0.043 [[alternative HTML version deleted]]
2013 Nov 18
2
[PATCH] al175: updated driver, please restore it
On Tue, Jan 27, 2009 at 04:39:13PM +0100, Arnaud Quette wrote: > Hi Kirill, > > 2009/1/27 Kirill Smelkov <kirr at mns.spb.ru> > > > On Tue, Jan 13, 2009 at 05:58:23PM +0300, Kirill Smelkov wrote: > > > Arjen, Arnaud, > > > first of all, I'm sorry for my late reply. > > > > > > If it's not too late, here is updated al175: > > > > > > > &g...