search for: mgjust

Displaying 20 results from an estimated 22 matches for "mgjust".

Did you mean: just
2008 Oct 14
3
AIC score
Hello, I ran AIC for some competing models I created. I get df and an AIC score from the AIC procedure. Can I use the models with the lowest AIC scores from this procedure to choose my 'best' models? If not, what else do I need to do (and know) and how can I do it in R to chose the 'best' models? Thank you kindly, Michael [[alternative HTML version deleted]]
2008 Oct 01
1
Aggregate issues with subset
Hello, I used the aggregate function with success on my data frame "all". > aggregate(all, list(sc_recov), mean) I then made a subset of this data frame: >s.all <-subset(all, select= c(3,4,5,6,7,8,9,10,11,23)) but when I tried to to run the aggregate function on this subset: > aggregate(s.all, list(sc_recov), mean) The result is garbage (i.e. its not grouping the data).
2008 Oct 09
1
Interpretation in cor()
Hello, I am performing cor() of some of my data. For example, I'll do 3 corr() (many variables) operations, one for each of the three treatments. I then do the following: i <-lower.tri(treatment1.cor) cor(cbind(one = treatment1.corr[i], two = treatment2.corr[i], three = treatment3.corr[i])) Does this operation above tell me how correlated each of the three treatments is? Because this
2008 Oct 09
2
Exporting symnum() result from cor()
Hello, I am trying to export the results from symnum() while maintain their readability. I tried using sink to text file and also copying and pasting but the results end up looking like this: > symnum(c5.s) bC bED bEN bLP bLS bPA bPD bPR p bbContag 1 bbED + 1 bbENN_MN + B 1 bbLPI , , , 1 bbLSI + B B , 1 bbPAFRAC , * * , * 1 bbPD , B B
2010 Oct 01
2
Format of Output of Residuals
An excerpt from dataset ChickWeight: ??? weight Time Chick Diet 1?????? 42??? 0???? 1??? 1 2?????? 51??? 2???? 1??? 1 3?????? 59??? 4???? 1??? 1 I am interested in the residuals of the dataset.? Specifically in saving them to another format. I have been creating text files with sink. CW.lm <- lm(weight ~ Diet, ChickWeight) resid.CW.lm <- resid(CW.lm) But when I call: resid.CW.lm The data
2008 Oct 08
1
Choose subset for plot use (bwplot)
Hello, this code below was from a helpful R-help user. dat <- read.csv("Resid_fix2.csv", sep="," , header=T) dat11 <- dat[1:413,] # convert ambiguous columns to factors: dat11$Pri_No <- factor(dat11$Pri_No) dat11$RecovUnit <- factor(dat11$RecovUnit) # plot: require(lattice) bwplot(bbED~ Pri_No | RecovUnit, data=dat11, as.table=TRUE, layout=c(4,1)) This works,
2008 Oct 09
1
Write multiple objects / data frames into a single .csv -- write.csv
Hello, Is there a way to put multiple data.frames or objects into a single .csv ? I know I can use sink() to do this for a text file. Is there way to do it for a .csv? e.g. for sink() sink("c5.k.s.p.92.LN.sl.vs.mean.txt") symnum(c5.k.92.LN.sl.vs.mean) symnum(c5.s.92.LN.sl.vs.mean) symnum(c5.p.92.LN.sl.vs.mean) sink() Could I put these all into a single .csv, in a similar format to
2008 Oct 18
3
Select only cases with negative values
Hello, I was wondering if there was a way to only select cases my from data frame that contained a negative value? > c<-c(1,2,3,4,5,6,7,8,9,10) > d<- c(-1,2,-3,-4,5,6,-7,8,-9,10) > f <- cbind(c,d) > dat <-data.frame(f) > dat.lm <-lm(c~d) If I wanted to only use the rows that had a negative value in column d for my regression, how could I make that selection?
2011 Jul 13
3
Sum weights of independent variables across models (AIC)
Hello, I'd like to sum the weights of each independent variable across linear models that have been evaluated using AIC. For example: > library(MuMIn) > data(Cement) > lm1 <- lm(y ~ ., data = Cement) > dd <- dredge(lm1, beta = TRUE, eval = TRUE, rank = "AICc") > get.models(dd, subset = delta <4) There are 5 models with a Delta AIC Score of
2008 Oct 13
4
Add notes to sink output
Hello, How can I add notes (i.e. text) to a sink output? sink("test.txt") #This text will describe the test summary(x) sink() How can I add that text above to the sink output? Thanks, Michael [[alternative HTML version deleted]]
2008 Oct 14
4
Maximum number of pasted 'code' lines?
Hello, I write most of my R code in excel and then paste it into R. I am wondering if there is a limit to how much I can paste? I want to paste about 19,000 lines of code should this work? I am doing this because when I did it chunks it took about an hour and half. I thought if I could insert it all and leave it for that long that would be better time management. I am still waiting for 19,000
2008 Sep 24
2
Add "title" in sink output and possibility of plot-like output for text
Hello, I have been using sink to create text file outputs. >sink("summ_model1and2.txt") > summary(model1) > summary(model2) > sink() Q1: Is there a way I could add a line of the text above the summary to act like a title? Also, I have been using the following to save plots from the lm function: > pdf("small.bin.ENN_MN_withQ.pdf") > par(mfrow = c(2, 2), oma
2008 Oct 02
2
Multiple hist(ograms) - One plot
Hello, I am trying to plot multiple histograms with the same scales, etc into one plot. The commands below produce a 3 page PDF with each histogram occupying the upper right quadrant. And use slightly different scales on the X and Y axes. > s21 <- dat[dat$sc_recov=="21",] > s21.ED <- subset(s21, select=(bbED)) > s31 <- all[all$sc_recov=="31",] > s31.ED
2008 Oct 08
5
Plot means with error bars - A novice needs help
Hello, I'd appreciate a suggestion on how to construct plots (barplots?) that use means on the Y axis instead of density/count. I'd also like to use groups and plot error or confidence interval bars on these graphs. I know this is a read the manual situation. I'd appreciate help with what to read, or your benevolence with some sample code. I've looked at lattice and gplots2, but
2008 Oct 01
0
Multiple histograms one graphic device & groupings
Hello, I am trying to produce some graphics to visualize my data. I think I want histograms. I have a grouping variable that has 48 different groups. I would like to produce a graphic that contains three of of these groups in the same device (they are time steps). I would like create graphics for about 6 different variables (6 variables X 16 groupings of there = 96 graphics). I am unsure of how
2008 Oct 13
1
LM intercept
What is the difference when including or not including the intercept when using lm()? x.noint <- lm(weight ~ group - 1))# omitting intercept x <- lm(weight ~ group)) This has nothing to do with forcing the intercept to 0, correct? Thank you kindly, Michael [[alternative HTML version deleted]]
2008 Sep 23
1
Create groups from data to compute lm?
Hello, Below are the first two rows from my dataset and the header. This dataset has 5749 rows and I want to select only certain rows to be used based on existing grouping values. I am trying to group the data based on the values under 'ex_bin'. (e.g a group for 250, 251, 252, 500, 501, 502) I would then like to perform a lm for each grouping. My data: > all[1:2,] year extent scape
2009 Nov 03
2
bargraph.ci - CI and color question.
Hello, When using bargraph.CI in package sciplot can the bars for each group be different colors? How do I select the color for each group? When I use this instead of the default (SD vs SE): bargraph.CI(x.factor = dose, response = len, data = ToothGrowth, ci.fun= function(x) c(mean(x)-sd(x), mean(x) + sd(x)) ) Am I getting 95% CI bars? Thank you kindly, Michael Just
2008 Oct 10
1
Correlation among correlation matrices cor() - Interpretation
Hello, If I have two correlation matrices (e.g. one for each of two treatments) and then perform cor() on those two correlation matrices is this third correlation matrix interpreted as the correlation between the two treatments? In my sample below I would interpret that the treatments are 0.28 correlated. Is this correct? > var1<- c(.000000000008, .09, .1234, .5670008, .00110011002200,
2008 Oct 16
2
Using source()
Hello, I have never used source and I am a R beginner. If I have text file that contains 1,000's of lines of code. Can I use source to bring this code into R and execute the code? Does it run the code one line at a time? Is there a best way to setup source() for maximum effieciency? After reading ?source() would I just do: source("my_Rcode.txt") Thanks, Michael [[alternative HTML