search for: vlaue

Displaying 20 results from an estimated 28 matches for "vlaue".

Did you mean: value
2001 Sep 04
2
fastest way to multiply each column of a matrix by a single vlaue
Let A be a m by n matrix and b a length n vector. What is the fastest vectorized code for doing for(j in 1:n) A[, j] <- A[, j]/b[j] ? solution 1: t(t(A)/b) solution 2: B <- matrix( rep(b, m), byrow=T, nrow=m ) A/B anything else? I have a program that uses this kind of operation million of times and I appreciate your input. Thanks. Jason Liao ===== Jason G. Liao Department of
2007 Apr 20
2
Partitioning around mediods (PAM)
Hi, I need some help understanding the output from PAM. When I look at the output it doesn't list the cluster number by the median vlaues on each of the variables (like it does with k-means) Instead I have the following: So I know for instance cluster 1 has a mean for variable1 of 33.33, however when I run PAM i get: variable 1 variable2 29 32 12 97 12 9 308 106 8 217...
2006 Sep 26
2
colClasses: supressed 'NA'
Hi, The colClasses seem to be supressing 'NA' vlaues. How do I fix this? R script and first 5 lines of output is below. File "test2.dat" has blanks that are read as "NA" when I do not use 'colClasses', but as blanks when I use 'colClasses'. temp.df <- read.fwf("test2.dat", width=c(10,1,1,1,1,2,2,3,...
2001 Aug 28
2
using by to plot
Hello, I would like to use by to create a series of plots, but I'm not sure how to design the function. Here's what I've got: 1. A data frame of observations of measured value 2 measured vlaues and a pch code. V1 V2 pchCode .0045 123 1 .0034 145 2 .0045 123 1 .0046 167 3 ... So what I want to do is create a single scatterplot of the multiple conditions (specified by pchCode) and use pchCode to specify the plotting character within the plotting function. I'm imagining some...
2005 Jan 08
2
Least square minimization (non-linear)
Hi all, I think the last time i posted this topic i started on the wrong foot. Thnaks alot to everyone who responded. i'm coding in R(first time) for a paper my colleague is publishing. i plotted a histogram for 6000 values. I am told to plot experimental vs theoretical vlaues from the histogram and do a non linear least square curve minimization and compute the mean and sd of the new x values.Excuse me if this sounds too naive.Can you help me in getting a start on this one. Choudary Jagarlamudi Instructor Southwestern Oklahoma State University STF 254 100 campus D...
2006 Jun 16
1
Assignemt problem ,,,,,,,,,,,,,,,
...s<-1:30 dim(res)<-c(5,6) ind<-1:6 now i want to assign the value of this variable ind to first coloumn in matrix res. like res[,1]<-ind but this code is giving error , Actualy i have a for loop and value of ind variable is changing every time ,,total 6 times,,i want to assign every vlaue of ind (5 times) to each coloumn of res,,please help me in this regards anil ANIL KUMAR( METEOROLOGIST) LRF SECTION NATIONAL CLIMATE CENTER ADGM(RESEARCH) INDIA METEOROLOGICAL DEPARTMENT SHIVIJI NAGAR PUNE-411005 INDIA MOBILE +919422023277 anilkumar@imdpune.gov.in [[alternative HTML version...
2006 Nov 15
1
OPTIM--non finite finite different [13]
...optim() to minimise the loglikelihood function for fitting data to negative binomial distribution. But there initial value of log-likelihood and iteration 10 value are reasonable. for example: initial value 1451657.994524 iter 10 value 47297.534905 iter 20 value -623478636.8236478 Then the iter 20 vlaue suddelnly changes to a negative value and in the end the error mesage is "non finite finite different [13]" Has any one have this experience of what the wrong is? Thanks! Xin My function is: function (parameters,y,x1,x3) { alpha<-parameters[1:10]; beta<-parameters[11]...
2010 Mar 09
1
using near-zero probabilities in optimization
...ing mle2 for a multinomial likelihood optimization problem. My function works fine when I'm using simulated data, however my cell probabilities of the true data for the multinomial likelihood are sometimes very small (in some cases <0.00...) and the estimated point estimates fit the true vlaues quite poorly. Is there a way how to handle near zero probabilities in maximum likelihood optimization? Thanks a lot for the help best wishes Benedikt
2011 Jan 23
1
extract score vector and covariance matrix in glm package
Hello I am running a project but I encounter a problem . I would be happy to receive help : problem: I have a binary dependent variable and some covariates logit(y)=a+bx+cz . I want to estimate the score vectors and their covariance by the usage of logit function and so glm in R .The vlaue of one of the coefficient ( like b) is known previously and I want to extract a and c and covariance matrix. How could I do it? Thanks; [[alternative HTML version deleted]]
2008 Jan 22
2
R object as a function
...it twice. See the following (senseless) example of a double integration: test<-function(sf,lo,up,rest) { innerFkn<-function(sf,lo) { inte=integrate(f=sf,lower=lo,upper=4) return( inte$value ) } integral=integrate(f=innerFkn,lower=1,upper=2,sf=sf,lo=lo,up=up) return( integral$vlaue+rest ) } test(sf=stepfun(c(0,1),c(2,-1,3)),lo=0,up=2,rest=12) Why isn't it possible to define the "innerFkn" inside "test"? "sf" is a stepfun, but it should possibly be any function. How can I define some R object like a stepfun (depending on variables) which can...
2005 Jul 19
2
Michaelis-menten equation
Dear R users: I encountered difficulties in michaelis-menten equation. I found that when I use right model definiens, I got wrong Km vlaue, and I got right Km value when i use wrong model definiens. The value of Vd and Vmax are correct in these two models. #-----right model definiens-------- PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24), conc=c(8.57,8.30,8.01,7.44,6.88,6.32,5.76,5.20,4.08,2.98,1.89)) mm.model &l...
2005 Jan 07
1
Help in customising the NLS function to spit out mean and SD of new fit!!
...std4,sm=sm)) in the formula mean was mid point of 1st frequency bar and sd was sd of 6000 values.I do this 5 times each time changing the mean in the formula to be the mid point of the next frequency bar. now i plotted plot(fittedvals ~trimmedvals) I am told to plot experimental vs theoretical vlaues from the histogram and get a non linear least square curve fit. I need the mean and sd of this new fit to proceed to my next module.I'm not sure if i'm on track. Excuse me if this sounds too naive.If nls is not what i should be using can you please give me some pinters to solve this....
2008 Apr 21
1
Good news for virtual EL-4.x boxes
...s is working by: Before making the change, use 'watch --interval=1 cat /proc/interrupts' and you'll notice that the timer interrupt is incrementing by 1000 every second. After you make the change, you you notice with the same command that it is incrementing via 1000/ every second. The vlaue of HZ that is exposed to modules is still 1000, thus not breaking module ABI. This same change is already present in RHEL5.1 today. In recent Fedora's, this is unnecessary due to the advent of the tickless kernel (which is useful for other reasons, including reduced power consumption on laptop...
2009 Aug 24
2
Creating a simple line graph
...need. So for: Sz= c("h1","h2","h3","h4") Pred=c(34790.0 ,47559.8, 21197.8, 28198.6) Obs=c(34740 ,48615 ,20420, 26840) MeanEst2000.Sz=cbind(Sz,Pred) LaneCo2000HH.Sz =cbind(Sz,Obs) I would like the x-axis to display the labels(Sz) and the y-axis to be the vlaues I am currently using the below (wont work with sample data) which gives me the proportions of the observed versus the predicted in four different graphs in histogram format. panelHist(DataMatrix=t(apply(Hh2000.SnSz, 1, 4)), ObsMeans=proportion(rowSums(LaneCo2000HH.SzWk),4),...
2018 Apr 19
0
create multiple categorical variables in a data frame using a loop
...s", "log2et_pfosa_acoh", "log2me_pfosa_acoh")) { > cat.var <- paste0("cat.",i) > pfas.pheno <- within(pfas.pheno, {eval(parse(text= cat.var))<-NA Nope. Cannot use R like a macro processor, at least not easily. R names are not the same as character vlaues. They "live in different realities". The `get` and `assign` functions can be used to "promote" character values to real R names and make assignments from and to what would otherwise be merely character values. Perhaps this (also mostly untested (except for the strategy of maki...
2018 Apr 20
1
create multiple categorical variables in a data frame using a loop
...2et_pfosa_acoh", "log2me_pfosa_acoh")) { >> cat.var <- paste0("cat.",i) >> pfas.pheno <- within(pfas.pheno, {eval(parse(text= cat.var))<-NA > > Nope. Cannot use R like a macro processor, at least not easily. R names are not the same as character vlaues. They "live in different realities". The `get` and `assign` functions can be used to "promote" character values to real R names and make assignments from and to what would otherwise be merely character values. > > Perhaps this (also mostly untested (except for the strate...
1999 Apr 21
0
trivial axis question?
...two xspos are too (?) close together the label gets dropped. That's probably a feature to save the user from overwriting two entries. E.g. I have an x-axs May Jul Aug (ommitting the Jun entry). Can I manually force R -- to write all xais entries -- independent of overlap, etc. -- or is there a vlaue where I can set the threshold I can set to tell R when to write and when not to write? Thanks for your time, Armin ---------------------------------------------------------------------------- Department of Mathematics | email: Armin.Roehrl at epfl.ch Swiss Federal Institute...
2018 Apr 19
4
create multiple categorical variables in a data frame using a loop
Hi All, I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code. pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA cat.pfoa[pfas.pheno$log2pfoa <=quantile(pfas.pheno$log2pfoa,0.25, na.rm =T)]<-0 cat.pfoa[pfas.pheno$log2pfoa >=quantile(pfas.pheno$log2pfoa,0.75, na.rm =T)]<-2
2005 Jan 07
0
Help in customising the NLS function to spit out mean and SD ofnew fit!!
...mid point of 1st frequency bar and > sd was sd of > 6000 values.I do this 5 times each time changing the mean in > the formula to > be the mid point of the next frequency bar. > now i plotted plot(fittedvals ~trimmedvals) > > I am told to plot experimental vs theoretical vlaues from the > histogram and > get a non linear least square curve fit. > I need the mean and sd of this new fit to proceed to my next > module.I'm > not sure if i'm on track. Excuse me if this sounds too > naive.If nls is not > what i should be using can you please...
2008 Jul 10
2
false discovery rate !
Dear All, It is not a typical R question (though I use R for this) but I thought someone will help me. For the list of P values, I have calculated FDR using p.adjust() in R (bioconductor). But my FDR values are same for all the P values. When do we get same FDR values? Does the smallest P values should less than 1/N? (where N is the number of P values) Thanks in advance. Kind regards, Ezhil