Josolumoh

25 Reputation

3 Badges

8 years, 354 days

MaplePrimes Activity


These are replies submitted by Josolumoh

@tomleslie 

 

Thank you!

But I wish to export it as CSV

 

restart;
  N:=100;
  X__1 := Statistics:-RandomVariable(Binomial(N, 4/10));
  ExcelTools:-Export( Statistics:-Sample(X__1, 50),
                      "C:/Users/TomLeslie/Desktop/X1.xlsx");

@sand15 

 

I wish to expot a row vector  X_1 to excel

N=100

X__1 := RandomVariable(Binomial(N, 4/10));

 

When I used the export command below, it shows error

ExportMatrix("C:/Users/jami.olu/Documents/X1.csv", X__1, target = csv)

 

Please, what is wrong ?

@sand15 

 

Many thanks.

 

I shall consider programming method.

I realy appreciate all the comments.

@Josolumoh 

 

I have been able to export it using this procedure I got online:

Export Data from a Spreadsheet

  

Data can be exported from a Maple spreadsheet to a file in one of three formats: Matlab,MatrixMarket, or Tab Delimited.

1. 

Select one Maple spreadsheet cell to export the entire spreadsheet, or select a range of cells to export the selected data.

2. 

Right-click (Control-click for Macintosh) on your selection, select Export Data, and then the format of the data file. The Export Matrix dialog opens.

3. 

Specify a path or folder name.

4. 

Enter the name of the exported file.

5. 

Click Save.

@mmcdara 

 

I have not been able to export more than 255 columns. But, I wish to export as much as all the columns generated.

How do I export the csv please? 

@mmcdara 

 

I am very grateful for the supports.

 

Now, I whish to  increase "NperB"  to large number (say, 2,000).  

Please, how do I export the results when the number of column is more than 255?

or is there anothe way of linking the results generated from MAPLE to another programming languages (like, R, STATA etc) directly?

 

 

 

@sand15 

Thank you so much.

I note your points and the prevoius ones. However, my problem is to generate random numbers when regression is considered.

If some parameters have not been introduced through b, the function will generate discrete random numbers (you may try it an generate discrete random numbres when b is constant, say b=1.5).

But, now I want it to generate discete random numbers given that b=beta_0*x_0 +beta_1*x_1 + beta_2*x_2

 

 

I think there is/are another comand(s)  to be added to this function (which I do not know) to will make it read b as a variable instead of constant.  

 

I appreciate you all as you are making me happy by confirming some of what I have proved manually...

 

@Carl Love 

 

Okay sir.

How do I do that (generate discrete random numbers) from the function B when d=0 and when d>0 

@Carl Love 

 

Thank you Prof.

I wish to generate discrete random numbers from the fuction B when d<0, when d=0, and when d>0 to study the finite property of the function B.

If you could remember, you guided me through to generate random number from the same function B. But, now I wish to add some parameters(beta_0, beta_1, and beta_2) through b

 

 

@Carl Love 

 

Hello Please,

 

I also notice that when is very small, it apperas that it sums to one.

 

Please, check it.

 

 

@Carl Love 

Please, suggest some possible ways of making it sum to one. 

 

 

 

Hello Please,

 

I have only used Poisson as exmaple thinking using known distribution will make the problem clearer.

Now, I have added my distribution in which I want to generate discrete random numbers from .

I have adjusted it with your corrections but still not generated discrete random numbers.

 

 

 

@Carl Love 

 

I am so grateful...

 

@Carl Love 

Here is it.

I want to fill-in the generated data in to the matrix.

Or

Any other way so that I can read it to another package.

 

restart:
B:= x-> binomial(n,x)*p^x*(1-p)^(n-x):
B1:= Statistics:-Distribution(
     Type= discrete, 
     ProbabilityFunction= B, 
     Support= 0..n, 
     DiscreteValueMap= (n-> n)
):
(n,p):= (23,1/3):

M := Matrix(50, 20, datatype = float[8]);
S:='Statistics:-Sample(B1, 50, method= [discrete, range= 0..n])' $ 20;

ExportMatrix(Datagen, M, target = csv);

Fill(S, M);

 

 

Thanks

@Carl Love 

Hello Prof,

 

I am using Maple 2015;

Could you please help me out on how to fill-in the generated data in to  a matrix.

 

Thanks

1 2 3 4 Page 2 of 4