Harry Garst

239 Reputation

5 Badges

18 years, 324 days

MaplePrimes Activity


These are replies submitted by Harry Garst

@dharr 

Thanks for your suggestion. However, if problems are too complex, I also fall back on numerical methods.

You wrote: "The main issue here is that the inverse of a matrix with symbolic entries is too complicated to be useful, except for very small matrices."

In my experience, it is possible to invert and interpret rather large and complicated matrices. All depends on the extent the matrices are structured or patterned, which they often are in statistics. And of course it depends on the power of the computer you are working on (my PC has 64GB of internal memory and a rather fast CPU). I can give you some spectacular results of Maple's capabilities in inverting and factoring large complicated matrices (of course with highly structured). But if the previous Kronecker example needs too much time, it will not work on your computer.
The main topic of my question has not been answered. Can someone show me how to include basis math results into the symbolic calculation in Maple. After all, no computation was needed if basic math knowledge was utilized.
Maybe as assumptions. Or using AI?

@sursumCorda 

Thanks a lot! You are the winner! And I learned something new: $ command!!

But for a matrix of size 8 the following is even faster than the build in command for determinant:
test_Determinants_symbolic_Modified_8_dimensions_Modified.mw

It always happens to me if I have too much new output in my worksheet. Deleting large parts of output solves the problem. 

@Carl Love 

Thanks a lot. Without the help of the experts of Mapleprimes it would be difficult to figure this out. You may say RTFM, but the Maple Help System is not always very helpful. Sometimes I suspect that a paragraph in the Maple Help System is only comprehensible for someone who is already an expert on the subject.
Maybe after clarifying a user question on Mapleprimes, a small addendum where the user could find all the information him- or herself, would be convenient. :-). If not present, update the help file.

@acer 

Thanks for your explanation. I still do not understand the following result:

``

restart; with(LinearAlgebra)

komb := proc (n::integer, m::integer)::indexed; local a, L, j; L := [seq(a[j, j], j = 1 .. n)]; add(mul(k), `in`(k, combinat:-choose(L, m))); return % end proc

A := Matrix(5, 5, shape = diagonal, symbol = a)

Matrix(%id = 36893491019324451524)

(1)

abs(A); [op(%)][1]; [op(`%%`)][2]; [op(`%%%`)][3]; whattype(%); whattype(`%%`); whattype(`%%%`)

a[1, 1]*a[2, 2]*a[3, 3]*a[4, 4]*a[5, 5]

 

a[1, 1]

 

a[2, 2]

 

a[3, 3]

 

indexed

 

indexed

 

indexed

(2)

komb(5, 5); [op(%)][1]; [op(`%%`)][2]; [op(`%%%`)][3]; whattype(%); whattype(`%%`); whattype(`%%%`)

a[1, 1]*a[2, 2]*a[3, 3]*a[4, 4]*a[5, 5]

 

a[1, 1]

 

a[2, 2]

 

a[3, 3]

 

indexed

 

indexed

 

indexed

(3)

If it looks like an 'índexed', if it called 'indexed', then maybe.....

simplify(abs(A)-komb(5, 5))

a[1, 1]*a[2, 2]*a[3, 3]*a[4, 4]*a[5, 5]-a[1, 1]*a[2, 2]*a[3, 3]*a[4, 4]*a[5, 5]

(4)

lprint(abs(A)); lprint(komb(5, 5))

a[1,1]*a[2,2]*a[3,3]*a[4,4]*a[5,5]
a[1,1]*a[2,2]*a[3,3]*a[4,4]*a[5,5]

 

lprint(abs(A))-lprint(komb(5, 5))

a[1,1]*a[2,2]*a[3,3]*a[4,4]*a[5,5]
a[1,1]*a[2,2]*a[3,3]*a[4,4]*a[5,5]

 

0

(5)

``

Download indexed_revisited.mw

I had this problem in the past. I guess it has something to do with an update of the Java driver. But I am not sure.

@Thomas Richard 

 

Thanks a lot. Missed that one completely!

Sorry!

@Thomas Richard 

 

Thanks a lot!

Yes, a lower number of digits is acceptable (the reason for the high number of digits is that I want to compare different methods of estimation (and I am not capable to compare these methods algebraically).

@Thomas Richard 

 

Here is a stripped version which also produces the same error.

 

kernel_connection_lost_error.mw

 

@dharr 

Thanks a lot!

There is still a lot to learn for me.

kind regards,

Harry

@acer  Thanks! exactly what I need! 
kind regards,
Harry Garst

@mmcdara 

Thanks for your reply.

in 2D these plots make clear that rotation changes the variance of the projections:

I found these animated gifs here:

https://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues

 

In 3D I think the projections should be on a plane. I would like to make semi-transparant XYZ planes with projections on them for a few points. Sure, it would be a mess if the data cloud consists of a large number of observations.

I never seen an animation in 3D using a rotating XYZ plane with projections on them for a few data points.

Maple animations can be very insightful, at least for me.

 

@mmcdara 

Thanks a lot! This is really helpful. 

kind regards,

Harry

@mmcdara 

A mixture model will be fine.

But on a general level I am trying to figure out the equations for the EM algorithm:

http://www.di.fc.ul.pt/~jpn/r/EM/EM.html

https://www.youtube.com/watch?v=StQOzRqTNsw

However, a Maple demonstration would be great.

My other questions (tetrachoric and polychoric correlations) could probably be solved with the 'fsolve' command and a bivariate normal distribution (as suggested by a collegue). Comparing observed proportions in a contingency table and expected proportions in a bivariate distribution with  a fixed correlation coefficient, but at least for polychoric correlations it has to be solved iteratively.
In R the code would be available, but to translate R into Maple may not be an easy job.

 

Thanks both of you!

I learned something new again!

Harry

1 2 3 4 Page 1 of 4