search for: quant

Displaying 20 results from an estimated 266 matches for "quant".

Did you mean: quan
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that the melt() function call is syntactically correct. The unmodifed data frame is organized this way: head(tds.anal) site sampdate param quant 1 UDS-O 2006-12-06 TDS 10800 4 STC-FS 1996-06-14 Cond 280 7 UDS-O 2007-10-04 Mg 1620 9 UDS-O 2007-10-04 SO4 7580 19 JCM-10B 2007-06-21 Ca 79 20 JCM-10B 2007-06-21 Cl 114 What I want looks like this: site sampdate TDS Cond Mg Ca Cl Na SO4...
2009 Aug 20
1
Questions on factors in regression analysis
...e response variable is numeric. Some factors are important but others not. How to determine which categorical variables are significant to the response variable? Q2. As we knew, lm can deal with categorical variables. I thought, when there is a categorical predictor, we may use lm directly without quantifying these factors and assigning different values to factors would not change the fittings as shown: x <- 1:20 ## numeric predictor yes.no <- c("yes","no") factors <- gl(2,10,20,yes.no) ##factor predictor factors.quant <- rep(c(18.8,29.9),c(10,10)) ##quantificatio...
2011 Oct 24
2
Syntax Help for xyplot()
.... of 4 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 4 6 4 4 4 5 5 5 $ sampdate: Date, format: "1996-06-02" "1996-06-02" ... $ param : Factor w/ 7 levels "Ca","Cl","Cond",..: 6 7 3 6 3 3 3 3 3 3 $ quant : num 194 530 826 36 848 ... and a summary of it shows: summary(burns.tds.anal) site sampdate param quant BC-3 :460 Min. :1992-03-27 Ca : 65 Min. : 1.00 BC-2 :107 1st Qu.:1994-09-21 Cl :148 1st Qu.: 14.03 BC-1 : 62 Median :1996...
2011 Aug 30
3
Descriptive Stats from Data Frame
...m asking here. I have a data frame with water chemistry data and I want to start exploring these data. There are three factors (site, date, chemical) associated with each measurement. The data frame looks like this: > summary(chemdata) site_id.sample_date.param.quant BC-0.5|1996-04-19|Arsenic|0.01 : 1 BC-0.5|1996-04-19|Calcium|76.56 : 1 BC-0.5|1996-04-19|Chloride|12 : 1 BC-0.5|1996-04-19|Magnesium|43.23 : 1 BC-0.5|1996-04-19|Sulfate|175 : 1 BC-0.5|1996-04-19|Total Dissolve...
2005 Dec 20
3
Overlaying lattice plots
Hillary, Richard M wrote: > Morning chaps, I have a little question for your capable minds... Say > I have an observed and predicted set of quants (in my case, length > frequencies by year and age/length), is there a way to use lattice > plots to plot the observed and predicted data together, panel by panel? > Obrigado/gracias (thankyou in Galego is?...) > Rich Hi Richard, If you want to plot both datasets on the same plot just...
2005 Dec 20
3
Overlaying lattice plots
Hillary, Richard M wrote: > Morning chaps, I have a little question for your capable minds... Say > I have an observed and predicted set of quants (in my case, length > frequencies by year and age/length), is there a way to use lattice > plots to plot the observed and predicted data together, panel by panel? > Obrigado/gracias (thankyou in Galego is?...) > Rich Hi Richard, If you want to plot both datasets on the same plot just...
2013 Feb 02
1
Mixed Models: Contribution of random variable to final estimate
Dear all, We want to test if the invasiveStatus is predicted by the amount (quant) of animals arriving to a country of a certain species (taxonid). We are using lmer to perform the model. The model is: lmer(invasiveStatus~I(log(quant+1))+I(log(inDegree+1))+(1|taxonid)+(1|country), family=binomial,data=td), where invasiveStatus is a binary variable, quant and inDegree are integ...
2009 Apr 25
3
Nomogram with stratified cph in Design package
...e. Non-Stratified Nomogram: f<-cph(S~A+B+C+D+E+F+H,x=T,y=T,surv=T,time.inc=10*12,method="breslow") srv=Survival(f) srv120=function(lp) srv(10*12,lp) quant=Quantile(f) med=function(lp) quant(.5,lp) at.surv=c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9) at.med=c(120,80,60,40,30,20,15,10,8,6,4,2,0) nomogram(f,lp=F, fun=list(srv120, med),funlabel=c("120-mo Survival","Median Survival"),fun.at=list(at.surv, at.med)) I get a the following warni...
2010 May 16
1
problems with generation of quantiles under For ()
Dear, I want to make an application to calculate quantile within a For() I tried the following without success: ej. date p_val <- matrix(sample(10, 1000, replace=TRUE), 200,5) test 1 rr <- paste("p_val$",names(p_val[1]), sep="") quant <- quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)/100, na.rm=F...
2012 Jun 07
1
Quantile regression: Discrepencies Between optimizer and rq()
Hello Everyone, I'm currently learning about quantile regressions. I've been using an optimizer to compare with the rq() command for quantile regression. When I run the code, the results show that my coefficients are consistent with rq(), but the intercept term can vary by a lot. I don't think my optimizer code is wrong and suspects it h...
2012 May 08
1
what folder to run write_PACKAGES in?
...lapply(dirs, dir.create, recursive = TRUE, showWarnings = TRUE) } } create_repo_tree("/tools/kran", c(2.13, 2.14, 2.15)) ########################################### My CRAN mirror is in a sister folder /tools/cran and that works properly to be served at the address http://rweb.quant.ku.edu/cran. I want our local testing thing to show at similar http://rweb.quant.ku.edu/kran. Supposing the Apache web server magic is done, I *believe* the following should work. I dropped packages in the right version folders, and I wrote a script that goes separately to each version number fo...
2012 Jul 10
2
Understanding cenros Error
Before reading water chemistry into a data frame I removed all missing data. Yet when I try to run cenros() to summarize a specific chemical I get an error that I do not understand: with( subset(chem, param=='Ag'), cenros(quant,ceneq1) ) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in 'y' I would like to learn what I did incorrectly so I can avoid these errors in the future. The data frame structure is str(chem) 'data.frame': 120309 obs. of 8 variables:...
2011 Dec 28
1
subset() missing one factor
...subsets for each of one of the factors ('stream'). This has worked flawlessly for all but two streams which were created yesterday. The command I use to create the subsets is like this: > rnchH <- subset(chemdata, stream == 'RanchSpgsH', select = c(site, sampdate, param, quant), drop = T) but it does not copy the dates in 'sampdate' for this and one other subset: > str(rnchH) 'data.frame': 0 obs. of 4 variables: $ site : Factor w/ 138 levels "BC-0.5","BC-1",..: $ sampdate:Class 'Date' num(0) $ param : Factor w...
2007 Oct 03
2
Shading area under density curves
...mposition ("d.sim"). The expression "all.d.nine.lm" equals lm(d.sim~d.dist). I saved the bootstrap results for each coefficient as: > dist.density.b1<-density(bcoef[,2]) > dist.density.b0<-density(bcoef[,1]) Along with their 95% confidence intervals: > dist.quant.b1<-quantile(bcoef[,2],c(.025,.975)) > dist.quant.b0<-quantile(bcoef[,1],c(.025,.975)) I then could plot smooth density curves along with their 95% CI's: > plot(dist.density.b1) > abline(v=dist.quant.b1) Now finally for my question: Instead of drawing vertical lines to repr...
2011 Sep 22
3
Bivariate Scatter Plots with Lattice
...f 4 variables: $ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "1987-07-23" "1987-09-17" ... $ param : Factor w/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ... $ quant : num 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0 ... I want to create scatter plots of the concentrations (numeric column 'quant') for two specified chemicals (factor column 'param') for all dates and streams (factor column 'stream') in which there are data. L...
2012 Oct 23
1
Understanding lattice barchart() display
...... $ tfamily : Factor w/ 81 levels "","Ameletidae",..: 79 46 46 14 42 ... $ tgenus : Factor w/ 206 levels "","Acentrella",..: 1 10 10 1 140 ... $ tspecies : Factor w/ 60 levels "","aequalis",..: 1 1 1 1 1 1 1 ... $ quant : int 22 527 22 22 11 97 333 11 108 11 ... $ stream : Factor w/ 7 levels "BCrk","JCrk",..: 1 1 1 1 1 1 1 1 ... $ basin : Factor w/ 2 levels "H","O": 2 2 2 2 2 2 2 2 2 2 ... When I create a bar chart for tclass by stream the result...
2005 Aug 05
1
contrast {Design} question
All, I have been trying to get the following code to work: A.quantiles <- quantile(foo.frame$A, probs = seq(from = 0.05, to = 0.95, by = 0.05)) base.quantiles <- quantile(Efficacy205$BASELINE_RANK, probs = seq(from = 0.05, to = 0.95, by = 0.05)) gender <- levels(Efficacy205$GENDER) contrast.1 <- contrast(Model.1, list(TPCODE= 'A...
2009 Mar 12
1
Cross-validation -> lift curve
Hi all, I'd like to do cross-validation on lm and get the resulting lift curve/table (or, alternatively, the estimates on 100% of my data with which I can get lift). If such a thing doesn't exist, could it be derived using cv.lm, or would we need to start from scratch? Thanks! -- Eric Siegel, Ph.D. President Prediction Impact, Inc. Predictive Analytics World Conference More info:
2011 Aug 31
2
Entering Multiline Commands With ESS
...s with ESS and want to enter multiline commands for plots. Examples in my reference books show each line terminating with a comma so labels and other attributes can be specified for the plot before it is submitted for rendering. When I try to do this, however, I get an error: > boxplot(chemdata$quant ~ chemdata$param), Error: unexpected ',' in "boxplot(chemdata$quant ~ chemdata$param)," Please explain how I enter these commands. Rich
2012 Sep 28
1
Lattice bwplot(): Conditioning on one factor
I'm not able to create the proper syntax to specify a lattice bwplot() for only one of two conditioning factors. The syntax that produces a box plot of each of the two conditioning factors is: bwplot(quant ~ param | era, data=mg.d, main='Dissolved Magnesium', ylab='Concentration (mg/L)') What I've tried unsuccessfully are: bwplot(quant ~ param | factor(era=='Pre-mining'), data=mg.d, main='Magnesium', ylab='Concentration (mg/L)) bwplot(quant ~ param | era,...