Displaying 14 results from an estimated 14 matches for "rngseed".
Did you mean:
rdseed
2004 Aug 26
1
EM norm package (NA/NaN/Inf in foreign function call (arg 2))
...ding the dataset
from the internet (it is not too big):
library(norm)
df<-download.file("http://www.tariqkhan.org/R/DataFromExcel.csv",
"C:/Program Files/R/d.csv")
mat<-as.matrix(read.table("C:/Program Files/R/d.csv", sep = ","))
s<-prelim.norm(mat)
rngseed(1234567)
thetahat<-em.norm(s, maxits = 1000, criterion = 0.0035)
Iterations of EM:
1...2...3........348...349...Error: NA/NaN/Inf in foreign function call
(arg 2)
Someone else on the list found that using scale() helped with em.norm, but
for me it only increased the number of iterations before...
2011 Nov 24
2
da.norm function
Hello all
I'm running da.norm function in R for climate data
rngseed(1234567)
theta1=da.norm(mydata, thetahat, steps=1000,showits=T)
param1=getparam.norm(mydata,theta1)
As I understand the 1000 steps represent the markov chain values. Is there
a way to plot them? Something like plot(1:1000, param1$mu[]). I just can't
find a way to extract them out of my theta1...
2007 Sep 21
1
A reproducibility puzzle with NORM
...!
CODE:
## Set up the situation:
Data<-read.csv("MyData.csv")
X<-Data$X; Y<-Data$Y
##(If you want to try it, set your own data here)
Raw<-cbind(X,Y)
library(norm)
## Initialise stuff
s<-prelim.norm(Raw)
t0<-em.norm(s)
##########################
## Set the Random Seed
rngseed(31425)
## Do the first imputation:
t <- da.norm(s,t0,steps=20)
Imp <- imp.norm(s,t, Raw)
X.Imp <- Imp[,1]; Y.Imp<-Imp[,2]
## Now do the rest, and accumulate lists of the results
## Est.Imp = list of estimated coeffs
## SE.Imp = list of SEs of estimated coeffs:
Est.Imp <- li...
2005 Feb 16
1
problem with da.mix
...t
V1 V2 V3 V4 ... V16 V17
1 1 1 2 6 18 18
2 1 1 1 NA 14 17
3 1 1 2 1 16 14
....
199 2 1 NA 7 19 18
200 2 1 3 2 14 17
> EntPrelim<-prelim.mix(as.matrix(Ent),9)
> EntEM<-em.mix(EntPrelim,maxits=500)
> rngseed(1234567)
> EntDA<-da.mix(EntPrelim, EntEM, steps=100, showits=TRUE)
Steps of data Augmentation:
1... Error in da.mix(EntPrelim, EntEM, steps=100; showits=TRUE):
Improper posterior--empty cells
If you know what is the matter, please help us.
2007 Jul 12
1
mix package causes R to crash
...ymis<-y
ymis[floor(runif(10,1,n))]<-NA
wmis<-w
wmis[floor(runif(10,1,n))]<-NA
dat<-as.data.frame(cbind(wmis,ymis,x1,x2,x3,x4))
s <- prelim.mix(dat,3) # do preliminary manipulations
thetahat <- em.mix(s) # ML estimate for unrestricted model
rngseed(1234567) # set random number generator seed
newtheta <- da.mix(s,thetahat,steps=100) # data augmentation
ximp <- imp.mix(s, newtheta, dat) # impute under newtheta
################################################################
Your mix package is important part of our ongoing...
2004 Dec 16
1
help with multiple imputation using imp.mix
...I am using mix and I'm trying really hard to understand, but
there's just this one step I don't get...perhaps someone knows the answer?
Thanks!
Jens
My code runs:
data<-read.table('http://www.courses.fas.harvard.edu/~gov2001/Data/immigrati
on.dat',header=TRUE)
library(mix)
rngseed(12345678)
# Preare data for imputation
gender1<-c()
gender1<-as.integer(data$gender)
gender1[gender1==1]<-2
gender1[gender1==0]<-1
data$gender<-gender1
x<-cbind(data$gender,data$ipip,data$ideol,data$prtyid, data$wage1992)
colnames(x)<-c("gender","ipip",...
2003 Jun 14
1
Missing data augmentation
...nite
To be honest I have no idea whatsoever what that error message means,
so my experiments with mice were shortlived :-)
I then tried the package "norm". I got some ways with the experiment,
following the help file:
s <- prelim.norm(as.matrix(myDataSet))
thetahat <- em.norm(s)
rngseed(1234567)
theta <- da.norm(s, thetahat, steps=20, showits=TRUE)
At this stage however I get the following error:
Steps of Data Augmentation:
1...2...Error: NA/NaN/Inf in foreign function call (arg 2)
This seems strange to me, since the whole purpose of this routine is to
work with NA values. S...
2005 Jul 08
2
missing data imputation
...e within the minimum and
maximum of the actual data? Below is the code I am using.
Thanks,
Anders Corr
Ph.D. Candidate
#DOWNLOAD DATA (61Kb)
download.file("http://www.people.fas.harvard.edu/~corr/tc.csv","C:/R")
#RUN NORM
tc <- read.csv("tc.csv", header = TRUE)
rngseed(1234567) #set random number generator seed
s <- prelim.norm(tc)
thetahat <- em.norm(s) #find the MLE for a starting value
theta <- da.norm(s,thetahat,steps=20,showits=TRUE,return.ymis=TRUE) #take 20 steps
ximp <- imp.norm(s,thetahat,tc) #impute missing data under the MLE
2005 Nov 09
2
error in NORM lib
...ataset works well with MICE and
aregImpute() and other statistics _and_ I checked the manpages and it
does not seem that the calls are wrong.
Thus, either it depends on the dataset (but why?) or it is maybe a bug.
I appreciate every help,
thanks,
leo g??rtler
<---snip--->
library(norm)
rngseed(1234)
load(url("http://www.anicca-vijja.de/lg/dframe.Rdata")) # load object
"dframe"
dim(dframe)
apply(dframe,2,function(x) sum(is.na(x))) # check how many NAs in the
dataset
#dframe <-
subset(dframe,select=-c(alter,grpzugeh,is1,is4,is6,klassenstufe,mmit,vorai,vorap,vora...
2005 Oct 04
0
The error message in package Mix
...rror: NA/NaN/Inf in foreign
function call (arg 1).
For example,
> s<-prelim.mix(Y,6)
Error in prelim.mix(Y, 6) : NA/NaN/Inf in foreign function call (arg 1)
or when I ran:
MI<-vector("list",5) #<--vector of complete data after MI
fit.model.mi<-vector("list",5)
rngseed(1234567) #<-- set random number generator seed
margins<-c(1,2) #<-- I have two categorical variables, if I had three, the
margin=c(1,2,3)
design<-matrix(c(1,1,1,1,0,1,0,1,0,0,1,1),ncol=3)
for (i in 1:5){
cat("Doing imputation ",i,"\n")
thetahat <- ecm.mix(s,margin...
2005 Oct 24
0
In da.norm Error: NA/NaN/Inf in foreign function call (arg 2)
...0-9 on Windows XP Professional.
#Sample code:
library(norm)
n<-50
p<-5
prob.miss<-.5
#generate complete data
x<-matrix(rnorm(n*p),nrow=n)
#create missing data
for (j in 1:p)
{miss<-rbinom(n,1,prob.miss)
for (i in 1:n){if (miss[i]==1) x[i,j]<-NA}}
#create imputations
seed<-1234
rngseed(seed)
s <- prelim.norm(x)
thetahat <- em.norm(s,showits=F)
da.norm(s,thetahat,steps=1000,showits=F,return.ymis=TRUE)
2005 Sep 27
0
Help: A application error and failed just-in-debugging.
...2,blood2,agem40,agem40sq,e
r,pr) #<--Y has to be a matrix for mix
s<-prelim.mix(Y,6)
#----------------------------run multiple
imputation------------------------------#
MI<-vector("list",10) #<--vector of complete data after MI
fit.model.mi<-vector("list",10)
rngseed(1234567) #<-- set random number generator seed
for (i in 1:10){
cat("Doing imputation ",i,"\n")
thetahat <- em.mix(s)
newtheta <- da.mix(s, thetahat, steps=2000, showits=TRUE)
MI[[i]] <- imp.mix(s, newtheta)
}
Here is help file about mix
Help files with alia...
2005 Nov 17
3
4.2 and the 'last' command
We've run into an interesting dilemma regarding last log information and
ssh 4.2p1. In 3.8, we didn't see this problem, but now has cropped up
in 4.2.
When a user logs in, sshd seems to call 'last' to get the last log
information. 'last' then opens the /var/log/wtmp file and processes the
information. On some systems, this file can be quite large, and we're
seeing
2012 Jan 28
1
PATCH: Support for encrypted host keys
...,7 @@ usage(void)
static void
send_rexec_state(int fd, Buffer *conf)
{
+ int i, num_host_keys;
Buffer m;
debug3("%s: entering fd = %d config len %d", __func__, fd,
@@ -914,6 +916,8 @@ send_rexec_state(int fd, Buffer *conf)
* bignum p "
* bignum q "
* string rngseed (only if OpenSSL is not self-seeded)
+ * u_int num_host_keys
+ * Key host_keys num_host_keys times
*/
buffer_init(&m);
buffer_put_cstring(&m, buffer_ptr(conf));
@@ -934,6 +938,18 @@ send_rexec_state(int fd, Buffer *conf)
rexec_send_rng_seed(&m);
#endif
+ num_host_key...