search for: vlaues

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

Did you mean: values
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 6...
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,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 somet...
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 Dr...
2006 Jun 16
1
Assignemt problem ,,,,,,,,,,,,,,,
  Hello list, i have a very simple question about matrix assignment. i did like this. res<-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
2006 Nov 15
1
OPTIM--non finite finite different [13]
Dear All: I used 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
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
2008 Jan 22
2
R object as a function
I want to use a function as an argument to ingtegrate 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 ) }
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),
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
Currently, if you are running CentOS-4.x on a Vmware box you end up with time skew problems. The main fix has been using a set of recompiled kernel that has a HZ that is more fitting with what Vmware expects (eg 100 hz). The 4.7 kernels look like they will not need this: http://jons-thoughts.blogspot.com/2008/04/rhel-and-vmware-time-skew-problems.html Well, I've gotten quite the number of
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 makin...
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 strateg...
1999 Apr 21
0
trivial axis question?
Hi, probably there's some parameter I don't know how to set. Using R 0.64 on a Sun sparc, I use the following command axis(1, at=xspos(times), labels=result, cex.axis=0.7) where result is sth. like c("May", "Jun" ,"Jul" ,"Aug", "Sep", ...) Now it plots it fine.. but when two xspos are too (?) close together the label gets dropped.
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