similar to: Basic general statistical problem.

Displaying 20 results from an estimated 9000 matches similar to: "Basic general statistical problem."

2004 Feb 23
2
deleting elements from an array/object
Hello, I created a simple histogram with: myHist<-hist(myData) the object myHist now has two arrays (among the others): myHist$mids myHist$counts Since myHist$counts contains some "0", and I want to calculate the linear fit among myHist$mids and log(myHist$counts), I want remove the elements of both arrays where these "0" occurs. which are the possible solutions to
2010 Nov 10
1
par mfrow in "function" problem
Hi all, I defined the following ############################# myhist=function(x){ hist(x,xlab="",main="") h=hist(x) xfit=seq(min(x),max(x),length=100) yfit=dnorm(xfit,mean(x),sd=sd(x)) yfit=yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) } ############################# individually, it worked fine however, if I used par(mfrow=c(2,2))
2004 Feb 21
3
saving variables created by functions in the workspace
Hello , just a simple question from a beginner: I write the function: plotsinx <- function() { x<-seq(0,2*pi,0.01) sinx<-sin(x) plot(sinx) } I recall it: plotsinx() and the plot works properly. but then in the workspace if I want to look at the values of sinx the following error is displayed: Error: Object "sinx" not found. How to save the variables created by the function on
2004 Mar 08
2
getting the std errors in the lm function
Hello, I have a simple question for you: making: mylm<-lm(y~x) summary(mylm) I get the following results: ****************************************************** Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.54087 0.19952 82.91 <2e-16 *** x[1:19] -2.32337 0.04251 -54.66 <2e-16 *** ******************************************************
2004 Oct 11
2
question on function argument
dear all, i've looked at the r-intro (chapter 10, writing your own functions) and searched the r-help archives but am still stuck at the following. i have a simple function, something like: myhist<-function(yvar) { y<-subset(myframe,yvar>1 & yvar<=150000,select=yvar) attach(y) hist(yvar) } calling it as follows: myhist(x1) gives the following error: Error in
2008 Jun 16
4
Superimposing Line over Histogram in Density Plot
Hi, Currently I have a density plot generated with this snippet. Is there a way I can add a line curve on top of it? I mean in one figure __BEGIN__ myhist <- hist(x col="blue", main = "Density Plot", xlab = "Exp Level", ) __END__ - Gundala Viswanath Jakarta - Indonesia
2004 Mar 03
3
plot(x,y) with errors
Dear all, I have 2 variables, x<-c(1,2,3,4,5,6,7,8,9,10) y<-c(1.3,2.5,4.6,5.3,5.9,6.7,7.4,8.5,9.4,10.4) each point of the y variable has an error: erry<-(0.2,0.3,0.2,0.1,0.4,0.2,0.3,0.4,0.3,0.2) how to plot(x,y) with the errors segments? Thank you, Copex --------------------------------- [[alternative HTML version deleted]]
2006 Apr 27
3
relative frequency plot
Hi All, I want to use "hist" to get the relative frequency plot. But the range of ylab is greater than 1,which I think it should be less than 1 since it stands for the probability. Here is my code: x<-c(1,1,1,0,0,1,1,5,1,1,0,1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,1,4,1,0,2,1,1,1 ,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1)
2008 Apr 14
2
Histogram Label Font Size
Hi! I'm having a trouble changing font size of histogram label. I have tried help(hist), but I couldn't find anything explain how to fix label's font size. Could you help me please? Thank you. _________________________________________________________________ Going green? See the top 12 foods to eat organic. 1N1653A [[alternative HTML version deleted]]
2008 Oct 21
5
how to plot the histogram and the curve in the same graph
i want to plot the histogram and the curve in the same graph.if i have a set of data ,i plot the histogram and also want to see what distribution it was.So i want to plot the curve to know what distribution it like. -- View this message in context: http://www.nabble.com/how-to-plot-the-histogram-and-the-curve-in--the-same-graph-tp20082506p20082506.html Sent from the R help mailing list archive at
2008 Jan 11
1
Histogram from frequency table?
Hi, I've had some trouble figuring out how to produce a histogram in R directly given a frequency table or relative frequency table. I've looked through the documentation and mailing list, and have only found information on producing histograms given the original data set. Any help would be appreciated! An example of what I'd like to do would be to take the following frequency table:
2003 Oct 13
1
Rotate a plot, and subplot
Hi all, Is there a way to rotate a plot, e.g. a histogram, by a certain angle (90/180/270 degress)? I spent hours trying to figure out how this is done, but without success. Also, I'm looking for an equivalent to the S-Plus "subplot" command to insert a kind of "thumbnail" graphic into a bigger one. How is this best done in R? Thanks for your help Pascal
2005 Jan 13
2
chisq.test() as a goodness of fit test
Dear R-Users, How can I use chisq.test() as a goodness of fit test? Reading man-page I?ve some doubts that kind of test is available with this statement. Am I wrong? X2=sum((O-E)^2)/E) O=empirical frequencies E=expected freq. calculated with the model (such as normal distribution) See: http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm for X2 used as a goodness of fit test. Any
2006 Jun 12
2
Fitting Distributions Directly From a Histogram
Dear All, A simple question: packages like fitdistr should be ideal to analyze samples of data taken from a univariate distribution, but what if rather than the raw data of the observations you are given directly and only a histogram? I was thinking about generating artificially a set of data corresponding to the counts binned in the histogram, but this sounds too cumbersome. Another question is
2011 Sep 08
6
Searching the console
Is there any way to search the console during an interactive session? I've looked and looked, and can not find one. In some add-on package, maybe? Sorry to be so basic, but help would be greatly appreciated. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-console-tp3797884p3797884.html Sent from the R help mailing list archive at Nabble.com.
2007 May 27
1
Passing a missing argument
Dear userRs, Is there a way to explicitly set an argument to a function call as missing? E.g., histogram(foo, bar, endpoints=ifelse(!missing(limits),limits,NA/NULL/whatever))) In this call I want to set a value to the endpoints argument only if the `limits' variable has been set, and leave the defaults otherwise. The only way I could do it is thus: if
2007 Mar 07
1
No fit statistics for some models using sem
Hi, New to both R and SEM, so this may be a very simple question. I am trying to run a very simple path analysis using the sem package. There are 2 exogenous (FARSCH, LOCUS10) and 2 endogenous (T_ATTENT, RMTEST) observed variables in the model. The idea is that T_ATTENT mediates the effect of FARSCH and LOCUS10 on RMTEST. The RAM specification I used is FARSCH -> T_ATTENT, y1x1, NA
2004 Jun 29
1
Goodness of fit test for estimated distribution
Hi, is there any method for goodness of fit testing of an (as general as possible) univariate distribution with parameters estimated, for normal, exponential, gamma distributions, say (e.g. the corrected p-values for the Kolmogorov-Smirnov or Chi-squared with corresponding ML estimation method)? It seems that neither ks.test nor chisq.test handle estimated parameters. I am aware of function
2000 Nov 03
1
Chi-square Goodness of Fit Test
Dear R-users, is there a function for the Chi-square Goodness of Fit Test in R (compare function chisq.gof in S/S-PLUS). Thanks for help. Matthias Seitzinger -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2003 Mar 26
3
a statistic question about chisq.test()
Hi, In the chisq.test(), if the expected frequency for some categories is <5, there will be a warning message which says Warning message: Chi-squared approximation may be incorrect in: chisq.test(x, p = probs) I am wondering whether there are some methods to get rid of this mistake... Seems the ?chisq.test() doesn''t provide more options to solve this problem. Or, the only choice is