Displaying 20 results from an estimated 10000 matches similar to: "problems with rounding in output"
2006 Apr 07
4
saving estimates from a for loop for later use
Thanks to the help of many on this list, I am now an R user and have
been able to write some functioning code to do matching estimation.
I have two for loops (i in 1:3, and j in 0:2). Within the loops, I
had been creating matrices of relevant estimation coefficents in order
to make lots of LaTeX tables.
Well, now I want to be able to combine the results of many different
estimations from within
2006 Apr 13
1
number of matches when using Match()
To anyone who uses the Match() function in the Matching library...
How do you go about deciding how many matches you will use? With my
data, my standard errors generally get smaller if I use more matches.
Speaking of standard errors, when correcting for heteroscedasticity,
how many matches do you use (this is the Var.cal option). It seems to
me that it might make sense to use the same number
2006 Apr 05
2
using latex() in R for Unix
I am using R for Unix and want to make some LaTeX tables. I have
already played around in R for Windows and have succeeded in making
tables that I want using the following code:
latex(Estimates, file='out.tex', rowlabel='',digits=3)
However, when I use this code in Unix, I can never find the file
"out.tex". I assumed that R would send the file to whatever directory
I
2006 Apr 16
1
dcolumn
Does anyone out there use dcolumn=TRUE in the latex() function in the
Hmisc library?
I would like to line up the data in a latex table I'm making using
latex(), but I'm having some issues with this feature. Since there is
no description of it in the help, I thought that it might be
incomplete or something like that.
On a related note, if anyone knows how to get the end result I want
2006 Apr 07
1
creating files using for loop
I would like to use a for loop to run estimations on 12 different
subsets of a dataset.
I have the basics of my script figured out, but I am having problems
getting the loop to name some files as I would like. Here is a
sketch of my code:
sub.dataset <- c(101, 201)
#Assume I only have two subsets which I call 101 and 201
for (i in 1:length(sub.dataset)) {
#Estimation commands
2006 Apr 02
1
New R user looking from help
Dear R users,
I am trying to become a convert to R (from Stata), and I'm having some
growing pains. Is there anyone would be willing to answer a few basic
questions I have? Of course I am using the relevant help guides...
Thanks,
Brian Quinif
ps. If there is anyone at UGA on this list, I'd love to hear from someone local.
2006 Apr 14
2
another very simple loop question
I have a dataset with 4 years of students, and normally I want to
estimate things using each individual year, so I have a for loop as
follows
for (i in 1:4){}
However, the only way I know how to calculate estimates using all four
years of data is to put the estimations outside of the loop. Is there
anyway to make a for loop that uses all four years at once, then uses
each individual year?
2006 May 01
2
problem installing Econometrics view
When I try to install hte Econometrics view I get the following error:
CRAN task view Econometrics not available in: install.views("Econometrics")
I have already install the ctv package and loaded it before trying to
install the above...
Any ideas as to what's going on?
2006 Apr 07
3
strange matrix behaviour: is there a matrix with one row?
Consider this:
> y <- matrix(1:8, ncol=2)
> is.matrix(y[-c(1,2),])
[1] TRUE
> is.matrix(y[-c(1,2,3),])
[1] FALSE
> is.matrix(y[-c(1,2,3,4),])
[1] TRUE
It seems like an inconsistent behaviour:
- with 2 or more rows we have a matrix
- with 1 row we do not have a matrix and
- with 0 rows we have a matrix again
I just stumbled on this behaviour, because I had a problem
with my
2006 Apr 07
1
Referencing variables in a dataframe.
I have a question about how to reference variables in a dataframe.
Normally, after I have read in some Stata data using the following command
all <- read.dta('all.dta')
Whenever I want to use the variable "sat.vr1" in the "all" data frame,
I do so using
all$sat.vr1
However, I'd like to be able to use the sat.vr1 variable without the
"all$" (as well
2006 Apr 12
1
long captions -- new issue
I have found out that the way to have a break apart a long caption in
the way that one desires is to have a short caption for use in the
list of tables that is not broken with \\
I can manually adjust the LaTeX output from the Hmisc function latex()
to get the tables how I want them. However, I would like to automate
the creation of these tables.
Inside the latex() function, I tried this:
2006 Jun 13
4
undesirable rounding off due to 'read.table' (PR#8974)
Full_Name: Aart Overeem
Version: 2.2.0
OS: Linux
Submission from: (NULL) (145.23.254.155)
Construct a dataframe consisting of several variables by using 'data.frame' and
'cbind' and write it to a file with 'write.table'. The file consists of headers
and values, such as 12.4283675334551 (so 13 numbers behind the decimal point).
If this dataframe is read with
2007 Sep 16
8
Rounding up to two decimal places
Hi there
I am going to calculate VAT at one of my websites, and UK VAT is 17.5
%.
So the question is how to round up some value to two decimal points?
I often get values like 6,991..
In php I was using round function
round($price, 2)
is in ruby something similat to PHP''s round function where I could
specify number of decimal places ?
P.
2005 Mar 02
1
Rounding parameter values in genoud(), Rgenoud package
I would like to limit the significant figures of the calibrated
parameters determined by genoud() in the Rgenoud package. Below is some
example output, where column 1 is model run number, columns 2-7 are the
parameter values, and columns 8-12 are model fit statistics. I would
like genoud to internally limit parameters to 4 decimal places as shown
in this output. It is clear that the function is
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and
sigma from N iid draws of N(mu, sigma^2):
tStat <- abs(x - muhat) / sigmahat
pValue <- pt(tStat, df=N, lower=TRUE)
I'm not quite sure what df tStat should have (exercise for math stat), but
given fairly large N, that should make little difference.
Andy
> From: Ross Clement
>
> Hi. I have a
2011 Oct 20
1
stop R from rounding
Hello,
I have a column in a data frame that need to be 10 digits long. As such:
Decimal.Year
1 1994.25997
2 1994.26020
However, R keeps rounding the digits. As such:
Decimal.Year
1 1994.260
2 1994.260
*Is there any way to stop this from happening?*
Here is how I created the data frame:
x <- read.table('bats_1994_CTD.txt')
colnames(x) <-
2006 Nov 13
3
Mysql 6 second rounding
This is more of mysql question then asterisk :D . Most voip providers use 6
second rounding for costing . My asterisk server stores call cdr's in mysql
properly with billsec field containing number of billed seconds . I want to
know some function to round this to 6 seconds ( or any custom valud like 30
seconds ) ..Suppose if billsec field is 3 seconds then it should round to 6
seconds , if
2009 Aug 17
4
Rounding to the nearest 5
Dear all,
A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places.
Thanks,
Steve
_________________________________________________________________
icons.
2009 Oct 29
2
Rounding and printing
Hello,
I am trying to print a table with numbers all rounded to the same number of digits (one after the decimal), but R seems to want to not print ".0" for integers. I can go in and fix it one number at a time, but I'd like to understand the principle. Here's an example of the code. The problem is the 13th element, 21 or 21.0:
>nvb_deaths <- round(ss[,10]/100,digits=1)
2011 Jan 15
2
Rounding variables in a data frame
Hi All
I am trying to use the round function on some columns of a dataframe while
leaving others unchanged. I wish to specify those columns to leave
unchanged.
My attempt is below - here, I would like the column d3 to be left but
columns d1, d2 and d4 to be rounded to 0 decimal places. I would welcome any
suggestions for a nicer way of doing this.
d1= rnorm(10,10)
d2= rnorm(10,6)
d3=