Displaying 20 results from an estimated 10000 matches similar to: "Expressions in plots"
2010 Oct 04
1
Help with apply
Suppose I have the following data:
tmp <- data.frame(var1 = sample(c(0:10), 3, replace = TRUE), var2 = sample(c(0:10), 3, replace = TRUE), var3 = sample(c(0:10), 3, replace = TRUE))
I can run the following double loop and yield what I want in the end (rr1) as:
library(statmod)
Q <- 2
b <- runif(3)
qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1)
rr1 <- matrix(0,
2010 Nov 14
1
Integrate to 1? (gauss.quad)
Does anyone see why my code does not integrate to 1?
library(statmod)
mu <- 0
s <- 1
Q <- 5
qq <- gauss.quad(Q, kind='hermite')
sum((1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) * qq$weights)
### This does what's it is supposed to
myNorm <- function(theta) (1/(s*sqrt(2*pi))) * exp(-((theta-mu)^2/(2*s^2)))
integrate(myNorm, -Inf, Inf)
2002 Dec 08
3
strange QQ-Plot
Hi,
i am working on a data set with EDA. That includes QQ-Plots of
residuals vs expected normal distribution.
What puzzles me is that the range of ordinate and abscissae is
so different: while the theoretical quantiles range from [-2, 2]
the sample quantiles on the ordinate do extent from [-20, 50].
Quite obviously some kind of transformation is done.
Although i intensively RTFM i could not
2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to.
The likelihood I have is (in tex below)
\begin{equation}
\label{eqn:marginal}
L(\beta) = \prod_{s=1}^N \int
2007 Mar 01
1
Generating R plots through Perl
Hello,
I am in the process of writing a Perl program to carry out and analyze
large numbers of regressions using R as the regression engine, and I am
using Statistics::R to create the communication bridge between the two
programs. Statistics::R creates a pipe between R and Perl and uses
Rterm.exe (hidden during run-time) to carry out the R commands. This
communication bridge works well for
2007 Nov 30
2
Quantiles and QQ plots
I have 20 variables:
5,9,6,1,5,9,7,4,5,6,3,2,4,8,9,6,1,8,4,8
How do I calculate the corresponding quantiles from a normal distribution
with the same mean and variance as the sample?
Also, how do I draw a QQ plot of the data?
Thanks for any help!
--
View this message in context: http://www.nabble.com/Quantiles-and-QQ-plots-tf4925742.html#a14097909
Sent from the R help mailing list archive at
2008 Jul 06
2
Regular expressions: bug or misunderstanding?
I'm trying to write a gsub() call that takes a string and escapes all
the unescaped quote marks in it. So the string
\"
would be left unchanged, but
\\"
would be changed to
\\\"
because the double backslash doesn't act as an escape for the quote, the
first just escapes the second. I have the usual problems of writing
regular expressions involving backslashes which
2013 Sep 10
1
[PATCH] show vector length in summary()
(summary.default): show the vector length in addition to quantiles
diff -u -i -p -F '^(def' -b -w -B /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old /home/sds/src/R-3.0.1/src/library/base/R/summary.R
--- /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old 2013-03-05 18:02:33.000000000 -0500
+++ /home/sds/src/R-3.0.1/src/library/base/R/summary.R 2013-09-10 10:19:02.682946339
2014 Mar 21
3
Local account login failed when samba join to LDAP
Dears,
My samba version is 3.6.4
I have a problem to co-work with open LDAP server. When samba join to open LDAP server, my local account can NOT login samba anymore, only LDAP account can login.
When my samba come back to standalone, the local account is OK. Did I miss something?
The following is my configuration files, I list the part of them,
smb.conf
server string = "Samba Server"
2013 Apr 05
1
mixed formatting of integer and numeric (e. g., by summary.default())
Hello, eveRybody,
I've been trying to find the origin for the following
formatting-"inconsistency":
E. g., look at the number of digits in summary.defaults()'s output when
NAs occur: in my example below the number of NA's is displayed as an
integer, the rest as numeric (floating point numbers):
> summary.default( c( 1:2, NA))
Min. 1st Qu. Median Mean 3rd Qu.
2009 Nov 01
2
Internal error in 'ls' for pathological environments (PR#14035)
nchar(with(list(2),ls())) gives an internal error. This is of course
a peculiar call (no names in the list), but the error is not caught
cleanly.
It is not clear from the documentation whether with(list(2)...) is
allowable; if it is not, it should presumably give an error. If it is, then
ls
shouldn't have problems with the resulting environment.
> qq <- with(list(2),ls())
2011 Feb 22
3
QQ International -- Almost works, but always says I'm "Away"
I got QQ International (version 1.0) to work via WINE under Mepis 8.5. Using winetricks, I installed all of the missing DLL's, and QQ now starts up and runs fine.
... except for the fact that it always shows me as being "Away". Even if I manually set my status to "Online", it changes me back to "Away" after a second or two.
This only happens under WINE. I log in
2012 Feb 17
1
QQ plot
Hello,
I am having two data set original and predicted.
I want to dind QQ-plot fot it.
I tried in following manner :
>qq(original~predicted)
and error was :
Error in qq.formula(o ~ p) : y must have exactly 2 levels
There is an option "qtype" which dosent make any difference.
What is the correct way for plotting QQ-plot or am I missing something.
--
Amar Kumar Nandan
2007 Nov 13
1
a very easy question, how to extract the name of the response variable
This may not be the smoothest way to produce the result, but here is a
two-step solution:
first find the formula within the object created by the call to glm():
form <- qq["formula"] or equivalently form <- qq$formula
then apply the function all.vars() to the result, and return the first
element
variables.in.formula <- all.vars(form)
variables.in.formula[1] # will be the
2010 Jun 08
10
QQ International - How to troubleshoot an app that wont run?
As I mentioned in the subject, I have installed the latest version of QQ International (beta 3), under wine in ubuntu lucid.
It installs without much trouble, however when I run the application, nothing happens.
How do I begin troubleshooting this application to see if I can make it work?
Or if anyone happens to know of an x64 linux qq client that actually works that would be great too :D
2001 Nov 09
2
confused by switch() and the letter E
I can't get switch() to work as expected with the letter 'E'. The following example from help works just fine.
> ccc <- c("b","QQ","a","A","bb")
> for(ch in ccc) cat(ch,":",switch(ch, a=1, b=2:3), "\n")
b : 2 3
QQ :
a : 1
A :
bb :
Now I replace "a=1" with "E=1"
2002 Jul 02
2
problem with qq( ) (PR#1729)
Full_Name: Jarno Tuimala
Version: 1.5.0
OS: Windows Nt
Submission from: (NULL) (193.166.1.21)
Running the following analysis gives as a result kukot vs. kisut.
aikaero <- -27.5+5*(0:10)
frekvenssi.m <- c(0,1,15,37,53,45,23,18,4,1,1)
frekvenssi.n <- c(2,8,12,19,33,47,42,15,2,1,0)
win.graph()
aikaero <- rep(c(aikaero,aikaero), c(frekvenssi.m,frekvenssi.n))
a.ero <-
2000 Feb 24
2
(-1 as index) OR (envelope for QQ)
I'm new to R (and to S) and am wondering about code from pages 72 and
83 of MASS (Venables+Ripley, 3rd edition), to draw an envelope on a QQ
plot. Copying from the book, I've got:
#... code whose gist is "a.fit <- nls(..."
num.points <- length(resid(a.fit))
qqnorm(residuals(a.fit)) # illustrate data-model residuals
qqline(residuals(a.fit))
samp <-
2016 Feb 08
1
Apparent bug in summary.data.frame() with columns of Date class and NA's present
Hi all,
Based upon an exchange with G?ran Brostr?m on R-Help today:
https://stat.ethz.ch/pipermail/r-help/2016-February/435992.html
there appears to be a bug in summary.data.frame() in the case where a data frame contains Date class columns that contain NA's and other columns, if present, do not.
Example, modified from R-Help:
x <- c(18000000, 18810924, 19091227, 19027233, 19310526,
2010 Jun 23
1
Video call with QQ or any messenger
Hi everyone,
I'm a newbie to wine, and am working on QQ or any other messengers in wine.
My environment is : ubuntu 10.04, installed wine 1.1.42, QQ2009. And during my debugging, I also check some source code from latest wine 1.2-rc4.
Although QQ's level is "garbage", but fortunately it works almost fine under wine, including login, text chat, ..... But the video call can only